Functions Documentation
View Function Edit Function
Name objDestroy
Syntax (objDestroy obj [objSource]) -> True/Nil
Argument List obj: The spaceObject that you want to destroy.
[objSource]: An optional spaceObject that destroys the other object.
Returns boolean: True if successful, otherwise Nil.
Category spaceobject
Description If used with only one argument it simply removes the spaceobject from the game. If the optional argument is provided, the function acts as if the target object was destroyed by the source, triggering any OnDestroy events, friend/enemy relations etc...
Example Assuming that the player has a ship targeted, this will destroy that target:
(objDestroy (objGetTarget gPlayerShip))
With the same assumption, this will destroy that target, and behave as if it was the player who did it:
(objDestroy (objGetTarget gPlayerShip) gPlayerShip)
Comment Can not be used on the player ship.