object

  1. jobjorgos

    Legacy GM [SOLVED] how to let object follow other object without flicking

    Hey, I have a boss that chases the player and that went pretty good with the following script: if gofollow == true{ move_towards_point( obj_player.x, obj_player.y, 9 ); } But the small problem now is that whenever the boss is straight at where the player is, it is gonna flick which look...
  2. C

    SOLVED: Instance_Create with Alarm event

    Good Morning, I have an alarm[0] that in 3 seconds I want the alarm to trigger and create an instance of an object after I press my action button. Any help would be appreciated. I created a alarm[0] event with the following: instance_create(x,y,obj_Garage_Door_Up) In my step event of the...
  3. A

    Suggestion: object from sprite funtcion

    I've looked around and am missing where to put technical suggestions so i posted here. Mods please move this to where it should be if it's not here thanks. I was wondering if there exists, or if not .. if this could be implemented? Simply put, a drop down function or keyboard shortcut to take...
  4. D

    [SOLVED] Referencing Specific ID of Object in Fast Collision

    I have 3 enemies in the room. When I kill one of them, they ALL die. In my bullet End Step event, I check a collision line for fast bullet collision. My goal, I presume, is to decrease the "hp" variable of the specific ID of the enemy object that the bullet is colliding with. I've done some...
  5. M

    How to take an object with the mouse and drop it

    Hi , i'm not a coder , and i don't know how to take an object with the mouse , move it and drop it after . If u don't understand , i want to create a chessboard and idk how to move the piece with the mouse only . I tried with the up/down/left/right , but i cant move only one piece , because they...
  6. S

    Object Collision Mask VS Sprite Collision Mask

    I'm unsure as to what the collision mask in the object is versus the collision mask in the sprite. What affects what? When I have a player object and a crate object, what effect does setting the collision mask in the sprite have vs setting the collision mask in the object?
  7. M

    GMS 2 Avoid duplicated events (SOLVED)

    Hello, I like to know the best way to avoid duplication. Here is a simple example: * game for 4 player * each player has 1 headquarter Here are some options but I hope there are better options I do not know until now: 1.one object for each player (+) organization of a room is easy (-) events...
  8. C

    Object Walking (Advanced?)

    Hey I have been trying to sort this problem out for about 8-10 hours and haven't been able to find anything online to help me nor have I been able to figure it out. The goal is to create a system which uses objects for the player, which are then moved, rather than using sprite animations. I want...
  9. A

    GML [Solved]Check istance of multiple objects

    Hello everybody! I've made some test and research, but i cant find a way to make my homing missile object (Obj_Missile) to point to enemies the way i want. Lets say i have this missile and i have 3 type of enemies (Obj_Enemy1, Obj_Enemy2, Obj_Enemy3). I want to use instance_nearest, or a...
  10. S

    Change path of an object at a point

    An object is moving on a path0. There is another path 'path1' close to path0 at x=a; y=b. How to change the path of the object from path0 to path1 at (a,b) ?
  11. S

    Change path of an object at a point

    An object is moving on a path0. There is another path 'path1' close to path0 at x=a; y=b. How to change the path of the object from path0 to path1 at (a,b) ?
  12. W

    Legacy GM How to save dead enemies? [DS MAP]

    Hey! I'm currently working on save and load but I've run into a problem... It saves the room and health etc. but not the enemies. So let's say you just cleared a level but stay in that room, then you quit and when you return there are all the enemies you just killed (What is happening). I want...
  13. R

    Question - Code Camera not following outside room

    Hi, The camera only follows my player inside the room but when I move to the edge of the room the camera just doesnt follow. This is the code im using to create the camera: camera = camera_create_view(0, 0, 1024, 768, 0, obj_player, -1, -1, 512, 384); view_camera[0] = camera; I hope someone...
  14. Ayziak

    GMS 2 Platformer Bullet Ricochet/bouncing/reflecting

    Hi all, So for a while, I've been trying to make reliable platformer bullet ricochet. Essentially, the player would shoot a projectile that would bounce/reflect off a designated object (that could be at any angle) following the ai = ar (angle of incidence = angle of reflection) formula. (as...
  15. I

    Question - IDE Dropping object in room snaps to grid intersection

    When dropping or painting (with LMB + ALT) objects into a room, the object snaps to the grid intersections. Also moving single objects snaps to grid intersections. However moving multiple objects (selected with LMB + SHIFT) moves the objects to the grid cells and not the intersections. This...
  16. U

    GMS 2 How to completely hide the object?

    In most development environments (and languages), hiding an object means that the most events can not be executed. In RAD Studio (delphi/c++) or Visual Studio (C#) events like OnClick or OnMouseEnter can not be executed when object is invisible (property visible=false). This is logical. But in...
  17. D

    GMS 2 Falling objects in GameMaker Studio 2

    Hi I am trying to create a game where objects randomly fall from the top of the screen so that they can then be collected by the player. The only tutorials I can find are for the previous version 1.4 and the code doesn't work. Would anyone know how to do this in the new version? Any help would...
  18. U

    GMS 2 Question about rooms

    In every room we can write a RoomCreationCode, create objects from code, place objects etc. Room is not persistent, and object is not persistent or global (like variable). Do we need to delete these objects, variables? RoomCreationCode (room is not persistent) //Camera create view_camera[0]...
  19. U

    GMS 2 Rooms and objects

    I have 3 rooms and 3 objects. Rooms - room_1, room_2, room_3. Objects - background_image, logo_image,surface_draw_enable_object. I want to have one camera and view settings for all rooms. I want to see background image, logo_image in room_1 and room_2. Not in room 3. So i must do the same...
  20. A

    GMS 2 combining strings into object name?

    Hi... Is there any way to combine names into one? Like say... var thing = 2 How do I make the object name cited be garden_door_2 named that in a statement just because thing = 2 ? Like... ("obj_garden_door_" + thing) make it's name Trying to make a bunch of repetitive code more efficient. Make...
Top