SetLockKeyTag(object, string)

From NWN Lexicon
Jump to navigationJump to search

Set the key tag required to open the object.

void SetLockKeyTag(
    object oObject,
    string sNewKeyTag
);

Parameters

oObject
A door, placeable or trigger.
sNewKeyTag
The tag of the key that is required to open the locked object.


Description

Set the key tag required to open the object. Retrieve it using GetLockKeyTag.

This will only have an effect if oObject is set to "Key required to unlock or lock" either in the toolset or by using the scripting command SetLockKeyRequired. Since triggers by default are not checked for locks in the engine (but does store the key tag correctly), you'd need to manually sort checking a tagged object is present in the OnAreaTransitionClick event using GetLockKeyTag.


See Also

functions: 

SetLockLockable SetLockKeyRequired GetLockKeyTag



author: Mistress