1. V

    Lifetime of an instance

    I try to give an instance a lifetime from 60 steps (1sec) but i'm in the learning process and new to Game Maker. So i guess it has something to do with alarms ...right ? what i'm looking for is something like instance_destroy(after 60 steps) can someone guide me to the right direction please...
  2. M

    Legacy GM Making preset instance creations

    Hello, all. I'm trying to make an infinite runner game. This is a little hard to explain, but the way I am attempting to do this is to have preset obstacles then create a random one in front of the player every few seconds. What would be the best way to do this? The only way I could think of...
  3. B

    Legacy GM Get list of instances in region

    Hi there, just curious if anyone knows if there is a way to return an array of the ID's of objects within a region? For example if I had 4 objects that are all in a region that is 128 x 128 pixels in size, would there be a way to get the ID's of JUST those instances returned in an array...
  4. D

    [SOLVED] GML Parenting question

    Hello everyone. So I found some time to start playing around with this sweet engine. I can say that Shaun has got excellent tutorials on youtube. So I was watching the one for the beginners, that we create an asteroids clone. On the fourth video, he demonstrated parenting. Comparing GML to...
  5. C

    Variable score issue ( with )

    Hi again. Coming from Ruby, Java, C#, C++, etc. I'm having a really hard time adapting to GMZ. I like the language for It's simplicity, but I can't get around some scoping problems. Here's the problem I've been having: local variable tower_hp(100003, -2147483648) not set before reading it...
  6. W

    [SOLVED] Best way to save and load detroyed instances?

    Hey guys, I'm new to the forums, so hello everyone! I'm developing a game where the hero is able to dig at some places. The question is quite simple: For example, when the player digs away some blogs in a room, saves the game, and enters the same room again in a new play session. What is the...
  7. G

    Instance Create at Collision Point

    How would I create an instance in the collision event between two objects? I want an effect I created to be created right at the point of collision between the two objects. So in Collision Event.... var collideLocationX; var collideLocationY; instance_create(collideLocationX, collideLocationY...
  8. G

    Snapping an Instance to Grid

    If I have... instance_create(irandom_range(0, room_width), irandom_range(0, room_height), object_box); How would I snap the objects x, and y to the nearest 16th value?... So if the x is 30, it moves to 32. (Let's assume object_box is 32x32 and the origin is 0,0)
  9. A

    How to check for variable inside one of many instances

    Hi everyone, I have a question that's been lingering inside my head for some time now. I'll try to put this in layman's terms because I don't know how ask it any other way. Suppose you have 3 instances of a certain object (we'll call it "obj_cake"). Each instance has a variable "num" and each...
  10. T

    Does create event take action instantly?

    Will new chunks that have been created run their create event code before being destroyed? // Destroy all chunks with (obj_chunk) { instance_destroy(); } // Create new chunks with (obj_asteroid) { scr_load_chunks(id); } // Destroy all chunks with (obj_chunk) { instance_destroy(); }