GetMaxHenchmen()

Gets the maximum number of henchmen

int GetMaxHenchmen();

Description

Gets the maximum number of henchmen



Remarks

Since Hordes of the Underdark, it has been possible for a PC to have more than one henchman. By default, the max number of henchmen will still be 1 - which is what this function will return if the function SetMaxHenchmen hasn't been called first.


Version

1.61

Example

//Returns the number of henchmen oPC has employed
//Returns -1 if oPC isn't a valid PC
int GetNumHenchmen(object oPC)
{
if (!GetIsPC(oPC)) return -1;

int nLoop, nCount;
for (nLoop=1; nLoop<=GetMaxHenchmen(); nLoop++)
   {
   if (GetIsObjectValid(GetHenchman(oPC, nLoop)))
      nCount++;
   }
return nCount;
}

See Also

functions: GetHenchman | SetMaxHenchmen
categories: Henchmen/Familiars/Summoned Functions


 author: Lilac Soul