DestroyObject(object, float)

Destroy an object.

void DestroyObject(
    object oDestroy,
    float fDelay = 0.0f
);

Parameters

oDestroy

The object to be destroyed

fDelay

Delay (in seconds) before object is destroyed. (Default: 0.0f)


Description

Irrevocably destroys oObject. This will not work on modules or areas.



Remarks

Object destruction occurs after the script that calls it completes.

If you set an object to be undestroyable (which according to the documentation only affects what happens upon death) the object will also be unaffected by DestroyObject. It is therefore important to only set
SetIsDestroyable(False) at the moment of the object's death.


Version

1.28

See Also

functions: ActionUnequipItem
categories: Action on Object Functions


 author: Charles Feduke, editor: Jody Fletcher, additional contributor(s): Tim Fletcher
 Send comments on this topic.