OnTrapTriggered

From NWN Lexicon
Jump to navigationJump to search

The script attached to this event fires when a trap is triggered. This could be used to spawn some creatures nearby who hear bells going off as part of a trap or include additional nasty effects to the trap springer (and anyone in its area of effect) above and beyond the standard effect.


Trigger

GetEnteringObject() will return who just triggered the trap.

See Trap Script for other useful functions.


Remarks

Traps applied onto triggers, doors and placeables have the OnTrapTriggered event. If this is defined, then it will override any default Trap Script that may apply damage. This is how Bioware made most of their custom spell traps (and how you can do yours).