OnPlayerRespawn

The script attached to this event fires when the player selected the "Respawn" button after dying. Normally the player would respawn where he or she died with no penalties and back to full health; however it typically makes sense to teleport the PC back to another area (or save location if this is a party-based module so as not to annoy the other players) and hit them for an XP and/or gold penalty.


Trigger

A player pressed the "Respawn" button on the "Death GUI Panel" popup dialog after dying.


Function(s)

GetLastRespawnButtonPresser() returns the PC who just respawned.


Remarks

The script "nw_o0_respawn" resurrects the PC, removes all adverse effects, and applies a XP and gold penalty. Also determines if there is a waypoint tagged "NW_DEATH_TEMPLE" and teleports the PC there. If there is no "NW_DEATH_TEMPLE" waypoint, then the PC is resurrected where he fell.


See Also

Objects with Events | Module
functions: GetLastRespawnButtonPresser