Please if someone can help me with the triggering of two spells, both are similar but each one works different.
When activated, the 1st spell starts to drain the health of the allies, at the same time damaging nearby enemies by same amount. Non-channeling, Last 6 seconds and 500 AoE.
When activated, the 2nd spell starts to drain the health of the enemies, at the same time healing nearby allies by same amount. Non-channeling, Last 4 seconds and 500 AoE.
Also I like to do the Siphon Mana target animation for the 1st spell, and Life Drain for second spell.
Trigger 1 Events A Unit Starts the Effect of an Ability Conditions Ability Being Cast = Add Your Ability Here Actions set Caster = Triggering Unit set CurrentLifeDrained = 0.00 Turn on (trigger 2) Wait Y Seconds Turn off (trigger 2) Custom Script: set bj_wantDestroyGroup = true Unit Group - Pick every unit within Area of Effect of your Spell of Caster matching Add Filter Here and do actions Loop - Actions Unit - Cause Caster to damage Picked Unit for Damage, Using Attack Type Attack Type and Damage Type Damage Type end of Unit Group end of trigger
Trigger 2 Events Every 1 second of game time Conditions none Actions For each integer A from 1 to 9999, do actions Loop - Actions Destroy SFXArray[indexCounter] Custom Script: exitwhen udg_indexCounter == 0 set indexCounter = indexCounter - 1 end of For loop Custom Script: set bj_wantDestroyGroup = true Unit Group - Pick every unit within AOE Of Spell of Caster matching Add Filter Here and do actions Loop - Actions set CurrentLifeDrained = CurrentLifeDrained + Damage Unit - cause Caster to damage Picked Unit for Damage damage, attack type Attack Type and damage type Damage Type Create an effect attached to Picked Unit with model SFX Model, attached to attachment point Attachment Set SFXArray[indexCounter] = Last Created Effect end of Unit Group end of trigger