Trigger spell, dealing AoE health dmg [Solved]
Hi guys,
I try to make a spell gather 20% of allies health in the area into 1 variable integer, and deal that amount to each enemy unit surrounding the caster whilst the allies are healed (the caster is not healed, but takes damage equal to 20% of current health).
But the trigger I've made doesn't seem to work properly.. I think I get the issue, but I just don't know how to arrange it.
Btw, it doesn't need to be MUI, since it's instant - I try to avoid that system. ^^
I've made it so far:

Hi guys,
I try to make a spell gather 20% of allies health in the area into 1 variable integer, and deal that amount to each enemy unit surrounding the caster whilst the allies are healed (the caster is not healed, but takes damage equal to 20% of current health).
But the trigger I've made doesn't seem to work properly.. I think I get the issue, but I just don't know how to arrange it.
Btw, it doesn't need to be MUI, since it's instant - I try to avoid that system. ^^
I've made it so far:
-
Vital Ritual
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Blood Boiler (Vital Ritual)
-
-
Actions
-
Set BloodBoiler_VR_IntegerDmg = 0
-
Set BloodBoiler_VR_Caster = No unit
-
Set BloodBoiler_VR_Target = No unit
-
Set BloodBoiler_VR_Ally = No unit
-
Set BloodBoiler_VR_Caster = (Triggering unit)
-
Set BloodBoiler_VR_Point = (Position of BloodBoiler_VR_Caster)
-
Unit - Cause BloodBoiler_VR_Caster to damage BloodBoiler_VR_Caster, dealing (0.20 x (Max life of BloodBoiler_VR_Caster)) damage of attack type Spells and damage type Normal
-
Unit Group - Pick every unit in (Units within 800.00 of BloodBoiler_VR_Point) and do (Actions)
-
Loop - Actions
-
Set BloodBoiler_VR_Target = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(BloodBoiler_VR_Target is A structure) Not equal to True
-
(BloodBoiler_VR_Target is Magic Immune) Not equal to True
-
(BloodBoiler_VR_Target is dead) Not equal to True
-
(BloodBoiler_VR_Target belongs to an ally of (Owner of BloodBoiler_VR_Caster)) Equal to True
-
BloodBoiler_VR_Target Not equal to BloodBoiler_VR_Caster
-
-
Then - Actions
-
Set BloodBoiler_VR_IntegerDmg = (BloodBoiler_VR_IntegerDmg + ((Integer(0.20)) x (Integer((Max life of BloodBoiler_VR_Target)))))
-
Unit - Set life of BloodBoiler_VR_Target to ((Life of BloodBoiler_VR_Target) + (0.20 x (Life of BloodBoiler_VR_Target)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(BloodBoiler_VR_Target is A structure) Not equal to True
-
(BloodBoiler_VR_Target is Magic Immune) Not equal to True
-
(BloodBoiler_VR_Target is dead) Not equal to True
-
(BloodBoiler_VR_Target belongs to an enemy of (Owner of BloodBoiler_VR_Caster)) Equal to True
-
BloodBoiler_VR_Target Not equal to BloodBoiler_VR_Caster
-
-
Then - Actions
-
Special Effect - Create a special effect at (Position of BloodBoiler_VR_Target) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-
Unit - Cause BloodBoiler_VR_Caster to damage BloodBoiler_VR_Target, dealing (Real(BloodBoiler_VR_IntegerDmg)) damage of attack type Spells and damage type Normal
-
Game - Display to (All players) the text: (String(BloodBoiler_VR_IntegerDmg))
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
Last edited: