[QUOTE=Ashley] IIDs and UIDs in the editor don't change depending on the Z order, but they do change if you delete and insert instances. Because of this you should not rely on knowing UIDs or IIDs in advance at all - the instance with UID 3, for example, could change to a different object if you add or delete some things in the layout view. This could easily break your game or make it work differently "randomly" (it will seem random to many users because they won't realise certain things they did changed the UIDs and IIDs). For this reason I don't think UIDs or IIDs should ever be displayed in the editor, in order to discourage this bad practice.[/QUOTE]
Using IGM and Stencyl, we can handle the specific object on the canvas after placing it, because the software will return to you a name for that object, so, if you have 10 Ogres using the same "gadget" (a gadget is where they put the behavior and animations, just like an object for C2), but you can handle each gadget on the canvas just calling his name.
Something like this:
You placed 10 Gadget "Ogre" on the layer 2.
The software will return to you a specific name, ogre_01, ogre_02, etc.
Editing the source code, you wanna do different AI for each one, because one of them will pick an axe on the ground, the other will pick a spear, etc.
It's just how these softwares works for me.
Now, think how a beginner will feel bad if he need to make an advanced code to search the UID/IID and after all this, he will destroy that gadget and will lose all his code (or will make random weird things on the screen after lacking the right UID).
The best to make here, in my lowly opinion, C2 should use a unique automatic indexing system to help beginner don't get lost, and speed up their learning curve.
I'm really worried about the UIDs, because my main game use modular characters, with dozens of sprites (pants, weapons, etc) and they have the possibility to pick things on the screen, like a sword on the ground (just like little fighter
) and after learning about the issues around IID, I should never destroy an enemy, or anything on the screen, because it can break the game.
So, now, the workaround used was recycling the enemies in different places of the stage (one good thing) but it will be a bad practice when talking about memory usage, etc.
Don't get mad with me, I'm just an curious about game, I do it for hobby, and I hope the better for C2, true it.