I'm having some trouble with a spell that is supposed to heal friends and make enemies miss on attacks, the problem is that once the spell is finished the heal effect only effects one unit and the miss effect only effects one as well (not the same unit). I can't find out what's wrong though, can anyone see the problem? the pause is for an animation effect btw
-
Prayer 2
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Prayer
-
Actions
- Custom script: local unit udg_AngelHealCaster
- Set AngelHealCaster = (Casting unit)
- Special Effect - Create a special effect attached to the origin of (Casting unit) using HolyAwakening.mdx
- Special Effect - Destroy (Last created special effect)
- Set AngelPoint = (Position of (Casting unit))
- Set AngelHealGroup = (Units within 400.00 of AngelPoint)
- Unit - Create 1 Dummy (all) for (Owner of (Casting unit)) at AngelPoint facing Default building facing (270.0) degrees
- Set AngelHealUnit = (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to AngelHealUnit
- Unit - Add Prayer (dummy) to AngelHealUnit
- Unit - Add Prayer (miss)(dummy) to AngelHealUnit
-
Unit Group - Pick every unit in AngelHealGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) is an ally of (Owner of (Casting unit))) Equal to True
- (Picked unit) Not equal to (Casting unit)
-
Then - Actions
- Unit - Order AngelHealUnit to Night Elf Druid Of The Claw - Rejuvenation (Picked unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in AngelHealGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) is an enemy of (Owner of (Casting unit))) Equal to True
- ((Picked unit) is Magic Immune) Equal to False
-
Then - Actions
- Unit - Order AngelHealUnit to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Unit - Pause AngelHealCaster
- Custom script: call RemoveLocation (udg_AngelPoint)
- Custom script: call DestroyGroup(udg_AngelHealGroup)
- Wait 1.20 seconds
- Unit - Unpause AngelHealCaster
-
Events