What is a simset?
by Gary "Cartoonist" Cooper · in Torque Game Builder · 03/11/2010 (8:21 pm) · 1 replies
I have been reading on arrays and how to use them so I could implement it in my game and I came across something called a simset, people were saying it is better and easier than arrays. I would like to know what a simset is and if there are any tutorials on it.
Thanks
Thanks
About the author
Torque Owner Netwyrm
Canopic Games
In your Inspector panel, in the list of objects in your game, simgroups appear as folders, with names, into which other objects can be placed. The "folder", or simgroup, can be addressed by name and its contents iterated over as one might do with a traditional array. This is used to turn lights on and off in bulk, for example.
Simsets work in similar fashion. I believe the difference is an object may only belong to one simgroup, but can be a member of multiple simsets.
%count = %simsetWhatever.getCount(); for(%i=0; %i < %count; %i++) { %obj = %simsetWhatever.getObject(%i); %obj.doSomethingToSimSetMember(); }Simsets can be created in pure script, without an Inspector representation.
These threads may be helpful:
http://www.torquepowered.com/community/forums/viewthread/30610
http://www.torquepowered.com/community/forums/viewthread/42803