Question About MissionCleanup.add(%obj)
by Frank Carney · in Torque Game Engine · 10/16/2005 (1:26 pm) · 3 replies
What does MissionCleanup.add(%obj) do for an object?
If I destroy a turret, how do I properly dispose of it if I added it to the group without a delete?
I am trying to "properly" create/destroy turrets in the game. Right now I have a function that will create turrets at every spawn point within a SimGroup. I have another function that will delete every turret. These functions allow me to test script creation of turrets. However, how do I properly use MissionCleanup.add. If I use this function during the creation it will crash the engine when I do a delete.
Thanks,
Frank
If I destroy a turret, how do I properly dispose of it if I added it to the group without a delete?
I am trying to "properly" create/destroy turrets in the game. Right now I have a function that will create turrets at every spawn point within a SimGroup. I have another function that will delete every turret. These functions allow me to test script creation of turrets. However, how do I properly use MissionCleanup.add. If I use this function during the creation it will crash the engine when I do a delete.
Thanks,
Frank
About the author
I Started programming in HS and have never stopped. Now an 18 year vet of programming anything from assembler on a NES console to a nuclear waste processing system. If it can be programmed I may have tried to program it!
#2
If you manually delete an object afaik it will get removed from any SimGroup/SimSet that it is a member of automatically.
10/17/2005 (4:55 am)
MissionCleanup is a SimGroup that pretty much any object you create during a mission should be added to. When the mission ends every object in this group will be deleted automatically so you don't end up with objects hanging around from mission to mission.If you manually delete an object afaik it will get removed from any SimGroup/SimSet that it is a member of automatically.
#3
10/19/2005 (9:06 pm)
Thanks
Torque Owner Frank Carney
DemolishunConsulting Rocks!
Thanks anyway,
Frank