Table of Contents

Method CreateTrap

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

CreateTrap(TrapBaseType, float, string, string, string)

Creates the specified trap.

public void CreateTrap(TrapBaseType trap, float size = 2, string tag = "", string disarm = "", string triggered = "")

Parameters

trap TrapBaseType

The base type of trap.

size float

The size of the trap. Minimum size allowed is 1.0f. If no value set, defaults to 2.0f.

tag string

The tag of the trap being created. If no value set, defaults to an empty string.

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).