Game Development Community

Adding/Removing Objects from Simgroups via Console/Script

by Samaursa · in Torque 3D Professional · 07/23/2009 (9:02 am) · 1 replies

Adding/Removing to SimGroups using

SimGroupName.add(someObject);

SimGroupName.remove(someObject);

messes up the editor's scenegraph. Adding will add the object into the SimGroup (sometimes it won't update until clicked) but the object will also exist in the MissionGroup. Both instances are click-able. Selecting the newly moved instance will select both instances while selecting the other instance will not.

Removing will not update the graph and the object seems like it is still under a particular SimGroup but

someObject.getGroup();

confirms the removal. Saving and reloading the mission fixes everything (so internally everything is working fine, the editor however is not updating properly)

I hope I am correct in assuming that multiple instances can exist in SimSets but not in SimGroups.

#1
07/23/2009 (12:57 pm)
I think this is a problem with the treeview, actually. I'm seeing the same thing in the GUI editor: when moving a child control to a new parent, the treeview lists it both under the previous and the new parent controls.