Author Topic: Explanation of SimSet/SimGroup/ScriptGroup.  (Read 1733 times)

I know what a ScriptObject does but I can't find anything that explains what SimSets, SimGroups, and what ScriptGroups are. This isn't necessarily for anything, I'm just curious as to what they are.

SimGroups are a meta class that you don't use when coding in Torque.

SimSets and ScriptGroups are essentially the same thing. The only (cardinal) difference is that an object can be in infinite SimSets, but only one SimGroup. Both are container objects that are meant to hold objects, not data. ::getGroup() will return a SimGroup but not a SimSet. ::onAdd is called when a group is added to a SimGroup, and ::onRemove is called when it's removed from a SimGroup. I do not believe these callbacks are triggered when adding and removing to a SimSet. Their names accurately depict what they are, a set is just a listing of objects, but a group is a, well, group of objects. I guess Torque groups are nationalistic and won't let you be in any other group without leaving that one, where as sets are just a list of objects, it doesn't really matter how many sets it's in. Also, if you delete a group, every object in that group will die too. I guess they should be called SimCults!ha ha ha that was the worst joke i've ever made
« Last Edit: January 20, 2013, 02:00:17 AM by !Trinick »