Loop not working properly

Mezion

New Member
Reaction score
0
It's pretty simple, I'm trying to trigger 3 wave of damage for an altered blizzard skill (only using the base skill for animation, it deals no damage on it's own). I want to change the damage to hero type to match my game logic.
I tried these two and still it doest work.
The first senario seems to work only once per unit in the area, and the second one seems to overkill so I guess it deal all of it's damage at the same time....

some help would be appreciated :)
p.s - dont worry, I disable one of them if I want to test the other so there's no problem there.

Trigger:
  • Blizzard H Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Ability being cast) Equal to Blizzard (H) (Lv 71)) or (((Ability being cast) Equal to Blizzard (H) (Lv55)) or ((Ability being cast) Equal to Blizzard (M)))
    • Actions
      • Set intIntell[2] = (Intelligence of (Triggering unit) (Include bonuses))
      • Wait 0.50 seconds
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set Temp_Group[0] = (Units within 250.00 of (Target point of ability being cast) matching ((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))))
          • Unit Group - Pick every unit in Temp_Group[0] and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Cause (Last created unit) to damage (Picked unit), dealing (0.60 x (Real(intIntell[2]))) damage of attack type Hero and damage type Normal
              • Unit - Add Frozen (STATUS) to (Last created unit)
              • Unit - Set level of Frozen (STATUS) for (Last created unit) to 2
              • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from Temp_Group[0])
              • Wait 1.00 seconds


and
Trigger:
  • Blizzard H
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Ability being cast) Equal to Blizzard (H) (Lv 71)) or (((Ability being cast) Equal to Blizzard (H) (Lv55)) or ((Ability being cast) Equal to Blizzard (M)))
    • Actions
      • Set intIntell[2] = (Intelligence of (Triggering unit) (Include bonuses))
      • Set Temp_Group[0] = (Units within 250.00 of (Target point of ability being cast) matching ((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))))
      • Wait 0.50 seconds
      • Unit Group - Pick every unit in Temp_Group[0] and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Cause (Last created unit) to damage (Picked unit), dealing (0.60 x (Real(intIntell[2]))) damage of attack type Hero and damage type Normal
          • Unit - Add Frozen (STATUS) to (Last created unit)
          • Unit - Set level of Frozen (STATUS) for (Last created unit) to 2
          • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from Temp_Group[0])
      • Wait 1.00 seconds
      • Set Temp_Group[1] = (Units within 250.00 of (Target point of ability being cast) matching ((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is alive) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in Temp_Group[1] and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Cause (Last created unit) to damage (Picked unit), dealing (0.60 x (Real(intIntell[2]))) damage of attack type Hero and damage type Normal
              • Unit - Add Frozen (STATUS) to (Last created unit)
              • Unit - Set level of Frozen (STATUS) for (Last created unit) to 2
              • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from Temp_Group[1])
        • Else - Actions
          • Do nothing
      • Wait 1.00 seconds
      • Set Temp_Group[2] = (Units within 250.00 of (Target point of ability being cast) matching ((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is alive) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in Temp_Group[2] and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Cause (Last created unit) to damage (Picked unit), dealing (0.60 x (Real(intIntell[2]))) damage of attack type Hero and damage type Normal
              • Unit - Add Frozen (STATUS) to (Last created unit)
              • Unit - Set level of Frozen (STATUS) for (Last created unit) to 2
              • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from Temp_Group[2])
        • Else - Actions
          • Do nothing
 

Mezion

New Member
Reaction score
0
errrrrrrr I mean first senario overkill and second only it once.

and why cant I put wait? I want the damage to be dealt at the same time the animation makes it logical. So, how would I loop with 1 sec between the loops then?
 

Laiev

Hey Listen!!
Reaction score
188
you can, but loop with (Integer A) and (Integer B) are both global loops, if ANY other thing use the same loop type, you'll overwrite it and will cause bugs because the wait, to fix it in gui, use custom integer to that loop and make sure you never use that integer for anything else
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top