instance

  1. A

    GML How to change layer of all instances of a specific object?

    I'm a beginner in Game Maker Studio 2 and I am trying to add a special feature to my game, but I just can't make it work fully, due to that the instances created by "room_instance_add" appear above every other instance in my room and I can't fix it completely with function "layer_add_instance"...
  2. T

    GMS 2 Assign several instances of an object to different paths

    Hej everyone. As the title already states, i would like to assign several instances of an object to different paths i set. Lets say i have an "enemy" object which has a specific behaviour: It follows a defined patrol path. If the player comes near the enemy, the enemy starts chasing the player...
  3. XirmiX

    GML with() doesn't recognise the other object that executes it?!

    The "with" statement is supposed to take an instance/object and make changes to that instance/object as if it's written within that instance/object, but the object that executes the statement can be called within the statement through "other", right? Well, I have had this work well until now...
  4. XirmiX

    GML [Solved] Iterations problem

    100 - 15 = -140 ? Well, that's what game maker thinks anyway. I have a game where a projectile is colliding with the tank that launched it (the player). The projectile bounces off the wall and hits the tank after being shot in a way that lines it up with the player's tank. I have a variable...
  5. jobjorgos

    Legacy GM why cant I add a marge to instance_activate_region?

    instance_activate_region(view_xview[0], view_yview[0], view_wview[0], view_hview[0], true); Works fine, it is just a little too small. Now I cant add a marge, whatever values I put it, I keep seeing objects dissappear at the edges. instance_activate_region(view_xview[0] - 264, view_yview[0] -...
  6. 2

    Characters taking damage from own bullets

    Im trying to make a "Super smash brothers" type of game. The problem Im having is that the characters can take damage from own bullets and destroy the bullet inside of itself. Its hard to explain but I hope you understand. What I was thinking of is that you can check if the object is created by...
  7. Nathan

    Mac OSX Room Editor : Replace/Swap objects?

    I am curious if there is a way to swap out objects that are placed in a room. For example, if I put 7 floor piece objects in a room and then wish to switch 4 of them with a spiked floor object, can I select an instance and swap it to a different object? For any video editors a perfect example...
  8. Dagoba

    Legacy GM with(furthest_object)

    Hello! I am trying to do something like this: - Get an ID of an object that is the furthest from goal.x and goal.y - The object must have a certain variable being a certain string, like "Blue" or "Yellow" How to do this? This is inside a script, you use it like this: scr_upgrade_item("Blue")...
  9. Ferrettomato

    Legacy GM [SOLVED] instance_exists still detects destroyed objects?

    I'm using instance_exists(obj_player) (where obj_player is the name of the player's object resource) to see if there's an instance of the player in the room so I know when to respawn them, but it seems to be returning true even when I've called instance_destroy and removed the player from the...
  10. 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...
  11. L

    Legacy GM Problem with multiple lever object that command a piston

    Hello, it's me again ahah, i wanted to share with you a problem on the reddit gamemaker challenge of november ; it was supposed to be a co-op game. I made a game that you play only one player at a time, but this is not the actual problem, the problem is that i got a very simple piston block...
  12. W

    Legacy GM HELP NEEDED! Random Character Name For Each Created Instance

    I am Building an RTS Type game and was hoping someone could help, I want it so that every time an instance of obj_fighter is created, that fighter has a unique name that will be displayed when clicked on or above their head. I can imagine this is quite simple but cant figure it out. eventually...
  13. T

    GMS 2 Problem with activating instances?

    In the game I am working on, for some reason, all objects that are children of my enemy object don't get reactivated when deactivated. I can't see what would cause this to happen. //CREATE EVENT depth = 1; mySoulWorth = 10; mySoulDamage = 2 * mySoulWorth; collided = false; collidable = true...
  14. R

    Instance create layer issue

    Hello, I'm new to Game Maker and I'm trying to figure out how to create an attack. I have it set so that when the F key is pressed there is a new instance of the attack object. But when this happens there are two attack objects that are formed. One is in the correct place and goes through the...
  15. kaerpaenen

    [SOLVED]activate/deactivate flicker

    Hi! I have a quick question about a problem I'm having. There's a fairly big world in the game I'm making, so I'd prefer to use the deactivating and regional activating for most of my objects, to optimize the performance. This works really nicely for my trees! But whenever I apply this to my...
  16. darijs1

    problem with instances...or ids....im not sure.

    i have an enemy object and a room controller thing. the room controller contains a variable called devmode which i want to use to see useful things that cant be seen normally. one of these things which i want to implement is an enemy hp tracker (just a draw_text that shows enemy hp above each...
  17. 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...
  18. Didjynn

    how to have access to a variable inside an object called with a variable ?

    Hello everybody, I began to create a "scan system" for my game. So I have a lot of instances of an objet which have a sprite of a 32*32 square. Each of these square contains the code to scan all instances around it (8 possible instances around). so I made this : if faction = 1 { if...
  19. Y

    Legacy GM objects not deactivated

    so objects outside of the view and it's padding get deactivated. this works if I do it every frame so I want to do it only when the walked a certain amount of pixels (256 in this case) but for some reason now everything keeps being activated. code: else if(view_xview[0] - lastxview > difference...
  20. U

    GMS 2 A few questions

    Hi! 1) When i developing the game, i use some images, objects, instances. The volume of my graphics (images) will be about 100-200 megabytes. So i need to load it in my game. I created objects and place objects in my room. Now i need to load sprites. I see two ways. First - load all sprites...
Top