CheckIsUnlocked(object)

From NWN Lexicon
Jump to navigationJump to search
Note: This function page documents something only available in the nw_i0_generic include file. The function may not be accurately documented here but you can read the nwscript code for the function in the game files.

Plays voice chat messages that indicates the locked status of a door or placeable.

void CheckIsUnlocked(
    object oLastObject
);

Parameters

oLastObject
The door or placeable to report the locked status of.

Description

Makes the caller of script do a voice chat that indicates the locked status of a door or placeable.

(Does not lock or unlock the object and does not make the creature do anything else).

Remarks

This function is not used in any Bioware scripts.

Requirements

#include "nw_i0_generic"

Version

1.22

Example

// This is the exact function
void CheckIsUnlocked(object oLastObject)
{
    if(GetLocked(oLastObject))
    {
        ActionDoCommand(PlayVoiceChat(VOICE_CHAT_CUSS));
    }
    else
    {
        ActionDoCommand(PlayVoiceChat(VOICE_CHAT_CANDO));
    }
}

See Also



 author: Tom Cassiotis, editor: John Shuell