From NWN Lexicon
Jump to: navigation, search

Sets the maximum number of henchmen

void SetMaxHenchmen(
    int nNumHenchmen


Maximum allowed number of henchmen in module


Sets the maximum number of henchmen.

This value is only probably checked when a AddHenchman() call is done, so setting it when they already have henchmen will probably not work.


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, so you must call this function manually, for instance in your OnModuleLoad event, to allow for more than one henchman.

It is an internal game limit, as in, it is hardcoded - of course, as the limit is unknown (and probably over 200) you can set it high enough so that AddHenchmen() always works.

You can retrieve this number with a simple call of GetMaxHenchmen(). It has no significance apart from the amount of henchmen the game allows you to have, as noted, checked when AddHenchman() is used.




// Example code for On Module Load to make the maximum
// number of henchmen 3
void main()
    // No parameter other then a number needed
    // Thats it!

See Also

functions:  GetMaxHenchmen

 author: Lilac Soul, editor: Jasperre, additional contributor(s): Jasperre