GetNumberPartyMembers
From NWN Lexicon
Contents |
[edit] GetNumberPartyMembers(object)
Returns the number of players in the PC's party
int GetNumberPartyMembers( object oPC );
[edit] Parameters
oPC
Player Character
[edit] Description
Returns the number of Player Characters in the PC's party, including the PC.
Does NOT include associates.
Uses GetNextFactionMember while valid, returns count.
[edit] Remarks
Include library for party-wide functions.
NOTE: this library is included in "x0_i0_common" already. Do NOT dual-include both files or you will get errors!
In version 1.61, a known bug was documented whereby the value returned was 1 (one) more than the correct value. This bug is fixed in version 1.69.
[edit] Requirements
#include " x0_i0_partywide "
[edit] Version
???
[edit] Example
// Returns correct number of PCs in oPC's party. void main() { int nPlayerCount = GetNumberPartyMembers(oPC); }
[edit] See Also
author: Peter Busby, editor: Ken Cotterill, Mistress, additional contributors: Grimlar, bug finder: Baaleos