Method CreateTrap
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
trapTrapBaseTypeThe base type of trap.
sizefloatThe size of the trap. Minimum size allowed is 1.0f. If no value set, defaults to 2.0f.
tagstringThe tag of the trap being created. If no value set, defaults to an empty string.
disarmstringThe script that will fire when the trap is disarmed. If no value set, defaults to an empty string and no script will fire.
triggeredstringThe 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).