Delete Projectiles and Explosion Data
by Gabriele B. · in Torque Game Engine · 06/08/2007 (12:40 am) · 4 replies
Hi all, in my game when the round end i don' t reload the map but i need to delete all active effect like particles,explosion,wallmark etc...
Someone know how i can delete all projectiles and explosion active ( like smoke granade) using the engine or the script ?
Thank you in advance
Someone know how i can delete all projectiles and explosion active ( like smoke granade) using the engine or the script ?
Thank you in advance
#2
When a projectile explode create a particleeffect (like a smoke) if i delete the particle effect without delete the Explosion Data the game crash.
How i can delete all explosion data actives ?
Thanks you in advance
06/08/2007 (1:50 am)
I already checked MissionCleanup but don't contains Explosion Data.When a projectile explode create a particleeffect (like a smoke) if i delete the particle effect without delete the Explosion Data the game crash.
How i can delete all explosion data actives ?
Thanks you in advance
#3
06/08/2007 (2:50 am)
You add them to the cleanup group and make sure the particle effects are deleted in the correct order in the deconstructor, perhaps.
#4
I have found this solution :
- I have added in Explosion class a list contains all Explosions (check this resource
http://www.garagegames.com/mg/forums/result.thread.php?qt=43712)
- Next i have created a script funcion like this :
ConsoleFunction(ClearAllExplosions, void, 1,1, "(void)"
"Reloads this emitter")
{
Explosion::removeAllExplosions();
}
- In the game restart script i call :
ClearAllExplosions();
ClearAllEmitters();
This work but i think is not a good solution i can't create a list for all the objects i should clear :(
Is possible to scan from the script this list : gClientSceneGraph ?
06/08/2007 (3:59 am)
Mmm how i can add ExplosioData to MissionCleanup list ?I have found this solution :
- I have added in Explosion class a list contains all Explosions (check this resource
http://www.garagegames.com/mg/forums/result.thread.php?qt=43712)
- Next i have created a script funcion like this :
ConsoleFunction(ClearAllExplosions, void, 1,1, "(void)"
"Reloads this emitter")
{
Explosion::removeAllExplosions();
}
- In the game restart script i call :
ClearAllExplosions();
ClearAllEmitters();
This work but i think is not a good solution i can't create a list for all the objects i should clear :(
Is possible to scan from the script this list : gClientSceneGraph ?
Torque Owner Martin Schultz