I've been trying to find a way to access the order information of objects. Naturally, in which order they have been created, and have them carry their information in each instance. As in, this is the first instance, that has been created of this object, this one the second, the third, etc. ... .
The only ways I could think of are too complicated, when I feel like there is surely an easy way.
I would do it with a global variable, and that is what I don't like, to have something external like that. Since, if different Objects get plentysome, I'd end up with loads of global variables just for ordering the instances of each Object.
I would basically do something like this:
+ globalvar('IDCounter') = 0
+ SpriteObjectVar('IndexID') = 0
+ For Each SpriteObject (Ordered by SpriteObject.UID - Ascending)
-> Add +1 to global('IDCounter')
-> SpriteObject.SetValue('IndexID') = global('IDCounter')
Thank You in advance.