This is quite a difficult problem to track down, and while I have been able to "fix" the problem, I have had to do so in a way that is not as good as I had hoped. If someone can help me get to the nitty-gritty of where this is going wrong, then please let me know. (Edit: This may be the simplest way of fixing it - by editing the spells that go awry, but if a better solution is suggested, then maybe I can use that.)
Here is the scenario ....
1) Goblin summons creature (wolf) from heartbeat when HenchTalentAdvancedBuff(40.0) fires.
2) PC then closes for combat with goblin and summoned wolf.
3) Goblin then casts Entangle spell, which captures PC and summoned wolf.
4) Wolf will now (occassionally) turn on the caster - it's summoner goblin - even though still hostile to PC.
I have tried a number of things, including trying to place in checks to keep the faction of the wolf and goblin the same. However, the only thing I can do at the moment that keeps the wolf attacking the PC (and this may be a clue as to how to fix it more properly) is to comment out the SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENTANGLE)); in both the initial entangle spell and its heartbeat script.
I intend to add a variable that changes the "harmful" nature of the spell in the above line of code to FALSE if the target is a summoned creature, which will narrow down the check somewhat. Here is the spell fix script that I am currently using:-
// FIX SUMMONED CREATURES REACTIONS
int REACTION = TRUE; if (GetAssociateType(oTarget) == ASSOCIATE_TYPE_SUMMONED){REACTION = FALSE;}
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENTANGLE, REACTION));However, does anybody know why this summoned wolf is actually attacking the goblin when I thought the default creature spell on cast at scripts were designed to ensure the reputation between summoner and summoned remained intact, and thereby prevent the summoned creature attacking its "master"? EDIT: Is the wolf's heartbeat causing a problem by counteracting the on cast at script? And by the way, NPC AoE damaging allies is set to FALSE.
Lance.
Modifié par Lance Botelle, 01 avril 2011 - 06:41 .





Retour en haut







