Author Topic: Last object in a script group being pushed to position 0  (Read 2066 times)

So I have a script group, maybe 6 script objects inside it
I add to it normally, e.g. %group.add(%object).
I delete object 0 via %group.getObject(0).delete().
The last object in the group is now object 0.

???????
« Last Edit: December 05, 2015, 09:32:37 PM by TheBlackParrot »



I guess it's a Blockland problem.

Just do %group.pushToBack(%group.getObject(0)); after.



I've never run into this before, and several of my mods use queues just like that.

Yeah, this is something that torque does. If you delete an object from a set/group, then the last object is put into its index, instead of having to shift all of the other objects down a slot. It can really screw you over if you're not expecting it and using sets/groups as an ordered container.