meaglyn wrote...
The lexicon page for GetHenchman has a routine for counting the number of hechpeople on the PC:
http://www.nwnlexico...tle=GetHenchman
Then something like this in your starting conditional (assuming you want this to return TRUE if the PC is
at the limit and not the other way around):
int nMax = GetLocalInt(oPC, "MAX_HENCH");
if (GetNumHenchmen(oPC) >= nMax))
return TRUE;
return FALSE;
Cheers,
meaglyn
Thanks a lot Meaglyn! I knew it was something simple but I got hung up on counting the henchmen. I couldn't get the GetNumHenchmen function to work so instead I used X2_GetNumberOfHenchmen and it worked fine:
//::///////////////////////////////////////////////
//:: hen_party_full
//::///////////////////////////////////////////////
/*
Returns true if there is no room in the party
for another based on the HenchMax local integer
*/
//:://////////////////////////////////////////////
//:: Created By: Grymlorde
//:: Created On: February 11, 2014
//::
//:: Assisted By: Meaglyn
//:: Modified On: February 12, 2014
//:://////////////////////////////////////////////
#include "x0_i0_henchman"
int StartingConditional()
{
object oPC = GetPCSpeaker();
int nMax = GetLocalInt(oPC, "MAX_HENCH");
if ((X2_GetNumberOfHenchmen(oPC) >= nMax))
return TRUE;
return FALSE;
}
Modifié par Grymlorde, 12 février 2014 - 08:52 .