1. FrostyCat

    What's the Difference: Objects and Instances

    What's the difference: Objects and Instances GM Version: N/A Target Platform: All Download: N/A Links: N/A Introduction At least a dozen times a week, I see questions on the Q&A section that have to do with people not distinguishing objects from instances. This topic aims to explain the...
  2. B

    Legacy GM [SOLVED] Weapon's barrel face the moving enemy

    Hey guys,in game maker i've created a weapon and an enemy objecct and i want the weapon to face the moving enemy,so basically i want the weapon's barrel to face the enemy. I have tried it with this code: if(instance_nearest(x, y, obj_enemy)) { image_angle = point_direction(x, y...
  3. Y

    GML Trouble with sprite/object

    Hi, I'm having a problem. I have a have an transparent object that when I try to create it with instance_create. It isn't transparent. This has been bugging me for a while.
  4. Y

    make Object's rotation based on object position

    so I'm currently making an android game. atm i'm using my mouse to make the object look at it (as it always moves forwards) but this is isn't a really good solution. what I'd like to make is an object in the botom left corner of the screen that resembles the rotation based on its position...
  5. R

    GML Creating variables for copied instances

    Hi everyone! Let's say I have an object in my room. Then, through some way, I copy this object, creating a new instance of it. I can keep copying it if I want, ending up with multiple instances of that object. What I would like to know is, if it's possible to address a new variable to the...
  6. G

    GML Stay in same screen position

    The effect is very simple: I need to make the object constantly snap to the screen. The problem is that I really need that object (not only witht the draw event), and I can make it work with something like: "x=view_xview[0]+0; y=view_yview[0]+0;" The problem is that the object "moves" while the...
  7. Shadowblitz16

    GMS 2 changing room does not happen until after event?

    does anybody know how to get around my object being deleted after I change rooms? //Goto Room room = rm_menu; //Toolbar tools_menu = new_item(0, 2, 0, Item_Toolbar_Menu, new_exit(6,6,5,1)); //Menus menu_tiles = new_item(0, 16, 6, Item_Option_Tileset, new_exit(0,0,6,6)); /// @description...
  8. H

    Multiple Use for one Object?

    I have spr_title: it has 3 subimages (not for animation) obj_title: every instance for a subimage has been created in room i want to know if there i way to code every single instance of the object in the event. Thankyou
  9. MicroKiss

    Legacy GM To many objects make lag. /SOLVED/

    So I have an idea in this game where you can't see anything but you can shoot pixels to discover your map ABut the problem is that if I play for a while there will be to many pixels which are slowing down the game. Here is the game : https://ufile.io/73guu Could you please suggest solutions for...
  10. Shadowblitz16

    GMS 2 drag a window boundaries by updating mouse object's position to mouse previous x and y?

    does any body know how to keep an object snapped to the mouse position only on last frame? I thought instead of offsets I could do something like this.. //Mouse object step event var _widget = instance_position(x, y, UI_Widget); if (_widget != noone) { var _x1 = (_widget.location.X)...
  11. R

    GML Trying out an idea in GameMaker

    Hello everyone! I had an idea these days and I'd like to know if it's possible to implement it in GameMaker. Let's say I have an object, like a square, and other objects, similar to blocks. Each of those blocks would contain actions, like walk, jump, attack, etc. My ideia is to put those...
  12. S

    Legacy GM I want to code a swinging animation for a guy with a sword.

    I am new and cannot find the documentation that says how to switch sprites while creating an extended mask representing the weapon being used. The Step event of obj_player01: //Get the player's input key_right = keyboard_check(vk_right); key_left = -keyboard_check(vk_left); key_jump =...
  13. B

    How can I make a physics object jump to a specific location(instantly)?

    I want a physics object to jump to a location(xx,yy). I can't directly change the x and y of the object since it is a physics object. Also, there are other physics objects in it's path and I don't want to collide with them while this object 'teleports'. The only way I know how to do this is to...
  14. S

    player object not appearing in room when left button clicked

    I'm trying to add my player to the room but every time I click nothing is showing, I have the boxes visible, solid and physics selected for the object of the player and my wall object appears when I click to add it to the room but nothing happens for when I try with the player object, can...
  15. T

    Changing Sprite as it moves

    Hello, I am very new to gml and game making in general, I was wondering how I could make my sprite (main character) who has an idle animation. change to its movement animation as I press the button to move the object but returns to its idle animation as I unpress said button. I thank you for...
  16. Wuzzems

    Legacy GM Making objects appear invisible when moving behind other invisible objects.

    I thought of possibly making an object mimic the background but sadly the background is moving. Basically I want to move an object behind another invisible object, and as it moves behind that object it should be completely transparent, the parts that have moved behind it so far. Pretty much...
  17. R

    [SOLVED] Create/copy instance from object

    Hey there everyone I'm trying to make something, but it's getting really difficult. I'd like to share it with you. I have one button object on screen, called 'obj_button'. I made a piece of code so I can drag and drop it anywhere I want, and it's working fine. But what I'm trying to achieve...
  18. M

    Legacy GM [SOLVED] Object Refuses to Move

    I am having trouble in Game Maker and I can't figure out what I'm doing wrong. Basically I have an enemy in the middle of a room and an invisible object next to it that if the player collides with, it will set off a variable that causes the enemy to move towards the player. This is my code, in...
  19. mar_cuz

    Legacy GM Isometric Depth Question

    Hi GMC, Sorry I know this is an age old question. I'm working on an isometric game and I want the player to walk in front of and behind tiles. I know the depth = -y trick. But that only works if I use objects and I want to use tiles. My rooms are going to be quite big with a lot of other...
  20. B

    20 Sprites, 15 Object Limits

    So I am doing game maker in school and the version of game maker on the school computers uses .gmx files which is why I am using 1.4.1763 at home so I can work on the project at both school and home. I have reached my limit of 20 sprites and 15 objects. I saw somewhere that on more recent...