GetLockedObject

From NWN Lexicon
Jump to navigationJump to search



GetLockedObject(object)

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.

Finds the closest locked object up to a maximum of 10 objects away.

object GetLockedObject(
    object oMaster
);

Parameters

oMaster

The object to search out from.


Description

Returns the closest object that is locked within a 10 object radius. If there are no locked objects within the 10 object radius then it will return OBJECT_INVALID.



Requirements

#include " nw_i0_generic "

Version

1.22

Example

// Will find if any objects are locked within 10 objects
#include "nw_i0_generic"
void main()
{
    object a = GetLockedObject(OBJECT_SELF);
    if(a != OBJECT_INVALID)
        SendMessageToPC(GetFirstPC(),"YEAH I FOUND ONE");
}

See Also

functions: 

GetLockLockable



 author: GoLeM, editor: John Shuell