Small Simgroup tutorial
by Mike Stoddart · in Torque Game Engine · 09/06/2002 (9:10 am) · 7 replies
I found this SimGroup tutorial, which I thought might be useful to other people.
www.mage-tower.com/BadShot/ReferenceSimGroups.html
Also, I that I would point out that Torque scripting beginners should search Tribes2 related scripting sites for help, tutorials and examples.
www.mage-tower.com/BadShot/ReferenceSimGroups.html
Also, I that I would point out that Torque scripting beginners should search Tribes2 related scripting sites for help, tutorials and examples.
#2
I'm not positive on all the syntax... that just came from my head. If you get stuck, just open up the mission editor, look at MissionGroup's id, and type 1234.dump(); in the console (replace 1234 with MissionGroup id). That tells you all the methods you can call on MissionGroups (or any object, for that matter). If you can't figure out the parameters, search for it in the source, or write a test function that calls it, and when you run the game, put trace(true); in the console and check the console.log after you quit.
Hopefully someone else can add to this and show different ways to create/use simgroups.
06/17/2004 (11:58 am)
I posted this in another thread, but I thought it would be useful here. I guess I'll add a couple more things to it, too.new SimGroup(Backpack1);
%apple = createApple(red, 12 seeds, worm);
Backpack1.add(%apple);
%magazine = createBook(GG, newsletter, printed, limited edition);
Backpack1.add(%magazine);
for(%i = 0; %i < Backpack1.getCount(); %i++) {
echo(Backpack1.getObject(%i));
}
echo(%apple.getGroup());
if(%apple.eaten == true) {
Backpack1.remove(%apple);
}I'm not positive on all the syntax... that just came from my head. If you get stuck, just open up the mission editor, look at MissionGroup's id, and type 1234.dump(); in the console (replace 1234 with MissionGroup id). That tells you all the methods you can call on MissionGroups (or any object, for that matter). If you can't figure out the parameters, search for it in the source, or write a test function that calls it, and when you run the game, put trace(true); in the console and check the console.log after you quit.
Hopefully someone else can add to this and show different ways to create/use simgroups.
#3
06/17/2004 (12:06 pm)
VERY bad url Mike! Check it out and delete it if it always goes to a IP holder.
#4
06/17/2004 (1:23 pm)
A lot of links go bad after nearly two years :)
#5
06/17/2004 (3:57 pm)
Yeah check the date :)
#6
07/15/2004 (3:11 pm)
Mike, please edit and remove that URL, thx.
#7
07/15/2004 (4:01 pm)
WTG Desmond. :P
Torque Owner David Schwanke