Morrowind Mod:OnDeath

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

OnDeath

                OnDeath

        Type:   Combat

     Returns:   short

     Example:   if ( OnDeath == 1 )

     Scripts:   anoScript
                BILL_MT_WritGuril

Returns 1 for one frame when the actor is killed (0 otherwise). Calling this function clears the OnDeath flag for the calling actor. You cannot successfully call OnDeath twice in a single script (why would you need to?). This can also cause problems when you have multiple scripts running on the same target, that all check for OnDeath. The first to call the function will clear the flag, and the remaining scripts will not detect the death. One possible solution is to test for health being less than zero.

See Also: OnKnockout, OnMurder