Game Development Community

Time for an EASY question - despawning objects in TGB

by Josias Gibbs · in Torque Game Engine · 08/27/2008 (8:35 am) · 2 replies

Ok - here's an easy one - how do I despawn an object in a behavior? Something along the lines of %this.owner.delete()?

#1
08/27/2008 (9:09 am)
Yep!! You might also want to do "%this.owner.safeDelete()" I think it puts the object on a kind of "delete list" and waits until the object is no longer being referenced by another object to delete it, versus the "delete" command justs destroys it without worrying about whether it's being used or not.
#2
08/27/2008 (3:52 pm)
Good to know - Thanks Daniel