Table of Contents

_gen_door_dam.nss

Usage

Thsi script is used as a OnDamaged handler script of the door, placeables or secret doors.

This should be used by all doors. If special handing is required use Hooks to modify the behavior of this script.

What it does

This function will do following things:

  1. Hooks: Call the OnDamaged hook if defined.
  2. Heal: Heal the door with the amount of damage dealt.
  3. Keys: Check if the door requires specific key, and if so complain.
  4. Locked: Check if the door is locke, and if not complain.
  5. Keep locked: If door is supposed to be kept locked door_keep_locked on door or door_keep_locked on area, exit.
  6. Damage: Add damage dealt to damage variable and check it against damage_limit or DC*DC. If damage limit is negative exit.
  7. Opening: If enough damage dealt open door. Visual effects used force_vfx*, force_vfx_player* damage_vfx* and damage_vfx_player*.

Variables in the placeables
Hooks
_gen_door_are
_gen_door_clo
_gen_door_fai
_gen_door_loc
_gen_door_ope
_gen_door_unl