Cleaning up sound objects
by Sean H. · in Torque Game Engine · 10/16/2006 (9:06 am) · 5 replies
I've noticed most of the gameplay objects in torque are placed in MissionCleanup and MissionGroup which are deleted when the player exits the level. what about sound objects? theres a few sound objects which are loaded before the main menu, shouldnt these be added to some group for deletion as well? or are they like guis and automatically cleaned up at some point?
#2
10/16/2006 (1:50 pm)
Well I just want to avoid allocating anything and not cleaning it up. I assume since the scripts are pretty nonchalant about creating sound objects that these things are removed automatically.
#3
10/16/2006 (3:55 pm)
.. i didn't know Guis were automatically cleaned up..
#4
I thought they were.
10/16/2006 (6:15 pm)
Quote:
.. i didn't know Guis were automatically cleaned up..
I thought they were.
#5
10/16/2006 (7:10 pm)
The superclass of a Gui control is SimGroup, ergo, when the main control goes away, all the objects inside it should go away too, just as if it were the MissionCleanup SimGroup. At least that's how I've understood it, but I haven't actually tested that assumption.
Torque Owner J "hplus" W
Most sound objects belong to some kind of game object (typically, ShapeBase, or some sort of vehicle or weapon), and those objects clean up their sounds when they go away.