Here's the script function, in case it helps:
void bchSicEm(object oWielder, object oClicked, int bHenchmen = FALSE, int bSummoned = FALSE, int bFamiliar = FALSE, int bAnimalCompanion = FALSE, int bDominated = FALSE){
object oAssociate;
string sMessage = GetName(oWielder) + " orders associates to attack " + GetName(oClicked);
FloatingTextStringOnCreature(sMessage, oWielder);
if (bFamiliar){
oAssociate = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oWielder);
AssignCommand(oAssociate, DetermineCombatRound(oClicked));
}
if (bAnimalCompanion){
oAssociate = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oWielder);
AssignCommand(oAssociate, DetermineCombatRound(oClicked));
}
if (bSummoned){
oAssociate = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oWielder);
AssignCommand(oAssociate, DetermineCombatRound(oClicked));
}
if (bDominated){
oAssociate = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oWielder);
AssignCommand(oAssociate, DetermineCombatRound(oClicked));
}
if (bHenchmen){
oAssociate = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oWielder, 1);
if (GetIsObjectValid(oAssociate)) {
AssignCommand(oAssociate, DetermineCombatRound(oClicked));
// if we have one hench, check for more
int i;
for (i = 2; i < 7; i++){
oAssociate = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oWielder, i);
AssignCommand(oAssociate, DetermineCombatRound(oClicked));
}
}
}
}
Modifié par BCH, 21 septembre 2010 - 10:07 .