RemoveHenchman

From NWN Lexicon
Jump to navigationJump to search



RemoveHenchman(object, object)

Removes the henchmen from the employ of a PC.

void RemoveHenchman(
    object oMaster,
    object oHenchman = OBJECT_SELF
);

Parameters

oMaster

The master PC with an attached henchman.

oHenchman

The henchman to remove. (Default: OBJECT_SELF)


Description

Removes oHenchman from the service of oMaster, returning them to their original faction.




Known Bugs

If you save/load henchmen from database, then the faction can get messed up if when removing henchmen. Henchmen will be removed, but still will show up in your "Party Menu" under PC portrait on right hand side of game.


Per WilliamDraco:

I think if saved to database, it saves their faction as the PC faction to the database. When they are later recalled from the database and added as henchman, the game goes "Ahh, original faction is PC Faction, and now add it as a henchmen to PC Faction"

When trying to remove it as a henchman, it goes "Alright, no longer a henchman of PC Faction, return it to the original faction of PC Faction"

Which, notably, is still the PC's party. So it doesn't leave the party

work around:

RemoveHenchman(oPlayer, oHenchman);
// "Merc" is tag of a in-game NPC with faction you want to change to.
ChangeFaction(oHenchman, GetObjectByTag("Merc"));

Version

1.22

See Also

functions: 

ResetHenchmenState | ChangeFaction



 author: Charles Feduke, editor: Tom Cassiotis