GetModuleItemAcquired

From NWN Lexicon
Jump to: navigation, search

GetModuleItemAcquired()

Get the item acquired on an OnAcquiredItem event.

Description

Returns the object that was just picked up or acquired in an OnAcquiredItem event. On error the function will return an OBJECT_INVALID; this should never happen but is possible if you trigger the event manually.



Version

1.22

Example

// This will find the name of the item acquired in an OnAcquiredItem event.
void main()
{
    object a = GetModuleItemAcquired();
    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