GetLastUsedBy()
From NWN Lexicon
Jump to navigationJump to searchGet the last object that used the placeable object or door that is calling this function.
Description
Returns the last object that used the placeable or door object that is calling this function. Used in the OnUsed event.
Returns OBJECT_INVALID if it is called by something other than a placeable or a door.
Remarks
See GetLastOpenedBy for a similar function used in the OnOpen event.
Example
void main()
{
object oUser = GetLastUsedBy();
if (GetIsObjectValid(oUser))
{
SpeakString("I was last used by: " + GetName(oUser));
}
}
{
object oUser = GetLastUsedBy();
if (GetIsObjectValid(oUser))
{
SpeakString("I was last used by: " + GetName(oUser));
}
}
See Also
functions: | |
events: |
author: Jody Fletcher, editor: John Shuell