GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2008-04-15 04:45:57

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

instance_id[] array

Apparently the instance_id[] array is recomputed after the Alarm Events and before the (Normal) Step Event. The Help File isn't specific, it only says:

GM7 Help File wrote:

Note that the assignment of the instances to the instance id's changes every step so you cannot use values from previous steps.

If I read his post correctly, EyeGuy seems to think this happens right before the Step Event. Can anybody confirm this?

http://gmc.yoyogames.com/index.php?showtopic=370336

Event Order:

GM7 Help File wrote:

Begin step events
Alarm events
Keyboard, Key press, and Key release events
Mouse events
Normal step events
(now all instances are set to their new positions)
Collision events
End step events
Drawing events


Abusing forum power since 1986.

Offline

#2 2008-04-17 14:29:58

EyeGuy
Member
Registered: 2007-10-18
Posts: 19

Re: instance_id[] array

Actually what I'm saying is it doesn't get updated in between the alarm event and the normal step event (and thus probably happens right before the begin step event).  My test seems to confirm that.

http://kainsirusque.googlepages.com/ins … d_test.gm6

Edit: of course, this is GM6, but I doubt it changed for GM7.

Last edited by EyeGuy (2008-04-17 14:33:43)

Offline

#3 2008-04-19 09:20:03

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: instance_id[] array

Thanks for the clarification.


Abusing forum power since 1986.

Offline

Board footer

Powered by FluxBB