Simultaniously modifying multiple objects in a level
by James Ford · in Torque X 2D · 07/25/2007 (2:07 pm) · 2 replies
Lets say I have a level with 50 trees which currently have no object type but I will need to add the object type of "tree" to all of them. Is there any "quick fix" for this type of thing in TGBX or XML editing? This seems to be one limitation in TGBX (changing all instances of an object at the same time). Note: all these trees are identical.
Is this the intention behind spawner objects? Make one template tree then all the trees in your level are "spawn once" spawner objects? That sounds useful in that you could make changes to the template and it would be mirrored everywhere, BUT, wouldn't that double the number of objects in your game? How much of a difference in performance would 50 trees vs 50 trees + 50 spawner objects make?
An XML solution idea: copy the entire code from one "tree" object (except for the position), then do find and replace all instances of that code and replace it with the same thing but also the one new line you want to add.
Is this the intention behind spawner objects? Make one template tree then all the trees in your level are "spawn once" spawner objects? That sounds useful in that you could make changes to the template and it would be mirrored everywhere, BUT, wouldn't that double the number of objects in your game? How much of a difference in performance would 50 trees vs 50 trees + 50 spawner objects make?
An XML solution idea: copy the entire code from one "tree" object (except for the position), then do find and replace all instances of that code and replace it with the same thing but also the one new line you want to add.
About the author
http://jamesdev.info
Torque Owner Dan Maruschak