Homeworld Effects Manual: deleteParentShip()

deleteParentShip()

Cleans up dead ships.

With the number of effects Homeworld can generate, garbage collection is important. Nobody likes a memory leak. deleteParentShip() should be in every death event. If you do not include this command, the dead ship will be rendered forever, spinning slowly, and unable to be attacked, ordered, or collided with. You do not need to call this command at startup or the end of the event; use it when appropriate. Until you call it, the dead ship is still there inside the effects created by the deathEvent. If you have ship-specific debris and are spawning piecces of the ship, you probably want to delete the real ship immediately. If you're blowing up a mothership, you may want the mothership to stay for 5 seconds while small explosions ripple along its surface. Just make sure you call deleteParentShip() at some point in the effect.

deleteParentShip() has no effect most in other types of effects. You cannot make a ship destroy itself with a weapon by putting deleteParentShip() in the fireEvent. However, it does work in gravwell events and hyperspace events. Using deleteParentShip() in these effects is a mistake of the highest order.