User Tools

Site Tools


cerea1:builders:gen_door_dam

_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*.
cerea1/builders/gen_door_dam.txt · Last modified: 2015/05/03 12:46 by 127.0.0.1