SetTrapDisabled

From NWN Lexicon



Contents

[edit] SetTrapDisabled(object)

Disables the trap on the specified object.

void SetTrapDisabled(
    object oTrap
);

[edit] Parameters

oTrap

a placeable, door or trigger.


[edit] Description

Disable oTrap.



[edit] Remarks

Can be used to create a mechanism to disarm a trap such as pulling a lever.

Disabling the trap is the same as manually disarming it and such will trigger trap's OnDisarm event.


[edit] Version

1.22

[edit] Example

// diables a trap that is on an object with Tag "Chest1"
void main()
{
    object oTrap = GetObjectByTag("Chest1");
    SetTrapDisabled(oTrap);
}

[edit] See Also

functions: 

GetTrapOneShot



 author: Chaz Mead, editor: Jochem van 't Hull
 

Personal tools
Categories