GetModuleItemLost

From NWN Lexicon
Jump to: navigation, search

GetModuleItemLost()

Get the object that was dropped on an OnUnAcquiredItem event.

Description

Returns the object that was lost in an OnUnAcquiredItem event. On error this function will return OBJECT_INVALID; this should generally not be possible as the event is triggered by an item, but if you trigger the event manually then be aware of this error.



Version

1.22

Example

// Finds the object that was last lost on an OnUnAcquiredItem event.
void main()
{
    object a = GetModuleItemLost();
    if(a == OBJECT_INVALID)
        SendMessageToPC(GetFirstPC(),"OOPS A CRASH ME THINKS");
    else
        SendMessageToPC(GetFirstPC(),GetTag(a));
}

See Also

functions: 

GetModuleItemLostBy

events: 

OnUnAcquireItem Event



 author: GoLeM, editor: Kristian Markon