OnDeath

From NWN Lexicon
Jump to: navigation, search

OnDeath

The script attached to this event fires when the object dies for any reason. It can be used to force the object to drop treasure, respawn at a new location, or cause a creature to spawn (or reincarnate!). DestroyObject will not trigger this event, although DM kill will (with an invalid last killer).


Trigger

When the creature, door, or placeable object has been killed (normally by reduction to 0 or less hit points).


Function(s)

GetLastKiller() returns the object that killed OBJECT_SELF.