Go melee works in conversation prior to combat. The only bug I know is that higher-level Rangers fail to melee.
I have my own henchman with custom conversation. I am not getting sucess in making henchmans stopping with ranged hits.
My script that create my henchmans:
object oEscudeiro = CreateObject(OBJECT_TYPE_CREATURE, "escudeiro1", GetLocation(oPC), FALSE, "hen_"+ObjectToString(oPC));
if (GetIsObjectValid(GetHenchman(GetPCSpeaker())) == TRUE)
{
SetFormerMaster(GetPCSpeaker(), GetHenchman(GetPCSpeaker()));
object oHench = GetHenchman(GetPCSpeaker());
RemoveHenchman(GetPCSpeaker(), GetHenchman(GetPCSpeaker()));
AssignCommand(oHench, ClearAllActions());
DestroyObject(oHench);
}
SetWorkingForPlayer(GetPCSpeaker());
SetBeenHired(TRUE, oEscudeiro);
SetFormerMaster(GetPCSpeaker(), oEscudeiro);
SetAssociateListenPatterns(oEscudeiro);
SetLocalInt(oEscudeiro,"NW_COM_MODE_COMBAT",ASSOCIATE_COMMAND_ATTACKNEAREST);
SetLocalInt(oEscudeiro,"NW_COM_MODE_MOVEMENT",ASSOCIATE_COMMAND_FOLLOWMASTER);
AddHenchman(oPC, oEscudeiro);
And the AI list of scripts attached to my creature henchman:
[ResRefs]
OnBlocked=nw_ch_ace
OnDamaged=nw_ch_ac6
OnDeath=nw_ch_ac7
OnConversation=nw_ch_ac4
OnDisturbed=nw_ch_ac8
OnCombatRoundEnd=nw_ch_ac3
OnHeartbeat=nw_ch_ac1
OnPhysicalAttacked=nw_ch_ac5
OnPerception=nw_ch_ac2
OnRested=nw_ch_aca
OnSpawn=nw_ch_ac9
OnSpellCast=nw_ch_acb
OnUserDefined=nw_ch_acd
I have a custom conversation that runs nw_ch_gomelee, the script default that makes henchmans stopping with ranged attacks:
[OWNER] Yes, Lord. What do you wish from me?
[PC] I would you stop with ranged attacks and start only melee.
And so run nw_ch_gomelee script:
#include "nw_i0_generic"
void main()
{
SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE);
ClearAllActions();
EquipAppropriateWeapons(GetMaster());
}
My henchman is continuing using area spells, spells, and I would like to make it stop doing that and just work on melee function.
Do you know anything I can do?