GetLastClosedBy(object)

From NWN Lexicon
Jump to navigationJump to search

Determine which creature closed a door, placeable or store.

object GetLastClosedBy(
    object oObject = OBJECT_SELF
);

Parameters

oObject
The object (door, placeable or store) to inspect for the last closer (default: OBJECT_SELF)


Description

Use this in an OnClose script to get the object that last closed the door or placeable. Returns the creature that last closed the door, placeable or store.

Returns OBJECT_INVALID if the caller is not a valid door, placeable or store.


Remarks

This function is most useful in the OnClose event script of a door, placeable or store object.


Version

1.62: GetLastClosedBy() scripting command now works in the OnStoreClosed event of stores.

This function was updated in 1.89.8193.37 of NWN:EE. VM: Added oObject parameter to GetLastClosedBy().


See Also

events: 

OnClose Event


 author: Jason Harris, editor: Jasperre, additional contributor(s): Jasperre, Jeremy Spilinek