SetIsDestroyable(int, int, int)

Sets whether an object is destroyable.

void SetIsDestroyable(
    int bDestroyable,
    int bRaiseable = TRUE,
    int bSelectableWhenDead = FALSE
);

Parameters

bDestroyable

If this is FALSE, the caller does not fade out on death, but sticks around as a corpse.

bRaiseable

If this is TRUE, the caller can be raised via resurrection. (Default: TRUE)

bSelectableWhenDead

If this is TRUE, the caller is selectable after death. (Default: FALSE)


Description

Sets the destroyable status of the caller.

If bDestroyable is FALSE, the body does not fade away and corpse is left, otherwise the body fades away.

If bRaiseable is TRUE the caller of this function can be raised via resurrection.

If bSelectableWhenDead is TRUE, then when the caller of this function is dead, players when moving their mouse over the corpse will see the name of the creature.



Remarks

If bSelectableWhenDead is set to TRUE, it does not mean that the corpse will be lootable by clicking on it to see its inventory. Creatures drop their inventory as loot only when they disintegrate.

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

categories: Action on Object Functions


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