• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] AOE Spell

Status
Not open for further replies.
Level 2
Joined
Apr 13, 2009
Messages
11
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
      • 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
      • Unit - Pause AngelHealCaster
      • Custom script: call RemoveLocation (udg_AngelPoint)
      • Custom script: call DestroyGroup(udg_AngelHealGroup)
      • Wait 1.20 seconds
      • Unit - Unpause AngelHealCaster
 
Level 2
Joined
Apr 28, 2009
Messages
22
Did you try increasing the AngelHealGroup range just to see if maybe all units weren't within the range? And I don't see the need for that variable at all to even begin with. Or AnglePoint. But, I won't really get into that.

Another thing, take out the expiration time maybe? OR, I guess did you make the dummy spells have 0 cast time, and blahblah all that stuff? So that the dummy unit doesn't have to wait for all these times to cast the spell.

It just looks like, alot of debugging needs to be done before you can pinpoint the exact problem. If I actually had it to play around with in the editor, I'm sure it'd be way easier than just looking at it. Also, to me, the loops look iffy. But, I don't think that's where I'd start at all.
 
Level 3
Joined
Mar 25, 2009
Messages
32
I think you should create the dummy unit in each of unit group not before that. You don't need expiration timer till 5 just set 1.
 
Level 2
Joined
Apr 13, 2009
Messages
11
The expiration timer was set that long because I was trying to pinpoint the source of the problem, all the dummy spells have a 0 cast time and angelpoint and angelgroup are there to remove leaks. I also tried wraiths solution and it didn't work, the problem was still there.
 
Level 11
Joined
May 31, 2008
Messages
698
you gotta create a dummy for each unit. Just move the part where you create the dummy and set it to a variable into the unit group loop. This way it will make a dummy for every unit that will be effected. This should work.
 
Status
Not open for further replies.
Top