Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Changing z order in the editor changes the iid of an instance.
Attach a Capx
Description of Capx
Shows that iid is changed with z order
Steps to Reproduce Bug
Closing as won't fix. IIDs are not constant and should not be relied on like that. Use UIDs instead.
Develop games in your browser. Powerful, performant & highly capable.
But why should changing the z change the iid?
Because the initial objects placed in the layout happen to be created in order of their Z order. You shouldn't rely on what order the editor happens to assign IIDs, they swap and change even at runtime as objects create and destroy; UIDs are there to be permanent references.
The runtime change is quite exploitable for instances, as long as the change is predictable.
Uid on the other hand, is not.
Well at least keep it in mind for C3 please.