Game Development Community

Level object numbers in .mis file

by Daniel Thornton · in Torque Game Engine · 07/09/2005 (9:26 pm) · 6 replies

In your .mis file, in the "new TSStatic" blocks with their coordinates and file paths, is there somehow a way to get the world editor number assigned to that shape to display in the script? This would help some aspects of my work flow from turning my level layout and placers to the final models.
thanks for any help

#1
07/09/2005 (9:38 pm)
Those numbers are not necessarily the same from run to run so I am not sure what this would gain you?
#2
07/09/2005 (9:44 pm)
Ok, didn't know that. Thanks
#3
07/09/2005 (10:21 pm)
Matt, maybe if you got a minute you can give me some more detail after you pointed that out to me. I've noticed that when I add shapes the added numbers to the editor list are way out of sequence sometimes, and when I reload , yeah they change, but into a correct sequence, maybe like 1002 to 1105 or something, without any number skips. I've restarted several times and they're always the same after the intitial restart. Were those few runs just lucky? trying to learn the mission editor and never really paid attention to those numbers till today.
#4
07/09/2005 (10:59 pm)
Open console, type tree();
That should help you figure out what is what.
#5
07/09/2005 (11:06 pm)
Yeah, that does
#6
07/10/2005 (3:11 am)
Numbers are allocated as objects are being created. All of the objects in the engine - script objects, gui controls, internal objects, world objects. - are allocated from that same pool. If any object is created in a different order, the IDs will be different. If you need to refer to a specific object, you should refer to it by name, not by ID.

If you load a mission twice, the IDs will be completely different.

Also, clients constantly allocate and deallocate objects, meaning that they burn through IDs at a pretty rapid rate independent of the contents of the levels they are in. If someone does a client side mod, that will also change the numbers. Or, heck, if they go through the menus more times than you expected, it can throw things off.