CreateTrapOnObject(int, object, int, string, string)
Creates a Trap on the object specified.
The base type of trap. TRAP_BASE_TYPE_*
The object that the trap will be created on. Works only on Doors and Placeables.
The faction of the trap. STANDARD_FACTION_*
The OnDisarm script that will fire when the trap is disarmed. If no value set, defaults to an empty string and no script will fire.
The OnTrapTriggered 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).
Creates a Trap on the object (doors and placeables only!) specified.
After creating a trap on an object, you can change the trap's properties using the various SetTrap* scripting commands by passing in the object that the trap was created on (i.e. oObject) to any subsequent SetTrap* commands.
The nFaction parameter is basically ignored since trap created on object adopts that object faction instead.