Table of Contents

Method CreateTrap

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

CreateTrap(TrapBaseType, string, string)

Creates the specified trap.

public void CreateTrap(TrapBaseType trap, string disarm = "", string triggered = "")

Parameters

trap TrapBaseType

The base type of trap.

disarm string

The script that will fire when the trap is disarmed. If no value set, defaults to an empty string and no script will fire.

triggered string

The script that will fire when the trap is triggered. If no value set, defaults to an empty string and the default OnTrapTriggered script for the trap type specified will fire instead (as specified in the traps.2da).