GetNumberPartyMembers

From NWN Lexicon
Jump to navigationJump to search



GetNumberPartyMembers(object)

Returns the number of players in the PC's party

Parameters

oPC

Player Character


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.



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.

Requirements

#include " x0_i0_partywide "

Version

???

Example

// Returns correct number of PCs in oPC's party.

void main()
{
   int nPlayerCount = GetNumberPartyMembers(oPC);
}

See Also



 author: Peter Busby, editor: Ken Cotterill, Mistress, additional contributors: Grimlar, bug finder: Baaleos