Scripts: Dying

The Dying script contains an instance to handle the character in your game dying. It displays a dialog box indicating that the player has died, then another one with the "restore","restart","quit" buttons.

By default, view.<DYING_SCRIPT> is used for the icon, and the message "You have died." is displayed. However, you can customize these. You can specify the view number with the caller property, and the message with the register property.


(var hDyingScript)

= hDyingScript ScriptID(DYING_SCRIPT)
send hDyingScript:
    caller(234) // set the icon to view.234
    register("You are now dead!") // set the message to display
send gGame:setScript(hDyingScript))


Public Procedures