MissionGroup vs. MissionCleanup
by Markus Nuebel · in Torque Game Engine · 06/29/2004 (12:05 am) · 3 replies
Hi guys, another SimGroup related question ;)
I noticed in the sample script code, that sometimes created objects are
added to MissionCleanup and sometimes they are added to MissionGroup.
e.g. in the TroqueDemo scripts
What is the difference between these groups?
When should I add objects to MissionCleanup and when to MissionGroup?
Thanks.
I noticed in the sample script code, that sometimes created objects are
added to MissionCleanup and sometimes they are added to MissionGroup.
e.g. in the TroqueDemo scripts
function ItemData::onThrow(%this,%user,%amount)
{
...
MissionGroup.add(%obj);
...
}
function CrossbowImage::onFire(%this, %obj, %slot)
{
...
MissionCleanup.add(%p);
...
}What is the difference between these groups?
When should I add objects to MissionCleanup and when to MissionGroup?
Thanks.
About the author
#2
06/29/2004 (8:20 am)
The rule of thumb is that if you want the object to save into the mission using the mission editor, put it in the MissionGroup. If it's just a random game object, put it in MissionCleanup. Also note that not all of the scripts in TGE may be correct, and if you come across anything like this, please post the problem/solution on the forums so that one of the GG guys can incorporate the fix into the CVS repository for everyone to have.
#3
I will put my stuff in MissionCleanup, to stick with the rules ;)
06/30/2004 (2:44 am)
Thanks, guys.I will put my stuff in MissionCleanup, to stick with the rules ;)
Torque Owner Gonzo T. Clown
But, both will be removed at the end of a mission unless you alter the code, so it doesn't really matter for the most part. However, in almost all cases, it would be safer and cleaner to just add newly created objects to the MissionCleanup group.