GetLocked

From NWN Lexicon



Contents

[edit] GetLocked(object)

Check whether a given object is locked.

int GetLocked(
    object oTarget
);

[edit] Parameters

oTarget

The object to check.


[edit] Description

Returns a true/false value indicating whether or not oTarget is locked. Returns TRUE if oTarget is locked. Returns FALSE if oTarget is not locked. There is no error value.



[edit] Version

1.22

[edit] Example

// This will check whether the object "chest" is locked or unlocked
void main()
{
    object a;
    a = GetObjectByTag("chest");
    if(GetLocked(a))    //Is the chest locked?
        SendMessageToPC(GetFirstPC(),"This is Locked");
    if(!GetLocked(a))   //Is the chest Unlocked?
        SendMessageToPC(GetFirstPC(),"This is Unlocked");
}

[edit] See Also

functions: 

GetLockLockable



 author: GoLeM, editor: Kristian Markon
 

Personal tools
Categories