Hello!
I’m trying to complement a henchmen script, I’m trying by looking at the magic examples in the script. It is used through conversation:
“I want you to use Remove Disease.”
Text appears when…
int StartingConditional()
{
int iResult;
iResult = GetHasFeat(FEAT_REMOVE_DISEASE, OBJECT_SELF);
return iResult;
}
Actions Taken
void main()
{
{ActionUseFeat(FEAT_REMOVE_DISEASE, OBJECT_SELF);
}
{DecrementRemainingFeatUses(OBJECT_SELF, FEAT_REMOVE_DISEASE);
}
}
“In who do you want to cast?”
Action taken
// Generate custom toekns for multiple henchmen.
void main()
{
object oPC = GetPCSpeaker();
int i = 1;
object oHench = GetHenchman(oPC, i);
while(oHench != OBJECT_INVALID)
{
SetCustomToken(77100 + i, GetName(oHench));
i++;
oHench = GetHenchman(oPC, i);
}
}
“In me”
Action taken
// the henchman targets the PC with the spell
void main()
{
SetLocalObject(OBJECT_SELF, "Henchman_Feat_Target", GetPCSpeaker());
}
“One moment.”
Action taken
// Remove the flag for henchmen of casting a group of spells.
void main()
{
SetLocalInt(OBJECT_SELF, "X2_HENCH_GROUP_CASTING", 0);
}
Well, I copied the other targets but just this doesn’t work anyway. What’s wrong? Can somebody help me out?
Thank you very much!