CheckPartyForItem(object, string)
From NWN Lexicon
Check party for possession of an item.
int CheckPartyForItem( object oMember, string sItem );
Contents |
[edit] Parameters
- oMember
- Member of party to be checked.
- sItem
- Tag of item to be checked for.
[edit] Description
Checks faction of oMember for the item defined by the tag sItem. Returns TRUE if anyone in oMember's faction possesses sItem. Returns FALSE if no one in oMember's faction possesses sItem.
[edit] Requirements
#include "nw_i0_tool"
[edit] Version
1.22
[edit] Example
// Attached to OnClick event of a trigger. Sends clicker to the destination // defined by waypoint WP_Destination if any party member possesses the key with // tag "TravelKey". Otherwise, displays message indicating that the party does // not have the key. #include "nw_i0_tool" void main() { object oClicker = GetClickingObject(); object oTarget = GetWaypointByTag("WP_Destination"); if (CheckPartyForItem(oClicker, "TravelKey")) JumpToObject(oTarget); else SpeakString("Your party does not have the correct key."); }
[edit] See Also
functions: | GetIsItemPossessedByParty |
author: Kristian Markon, editor: Jeremy Spilinek