• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] [GUI/MUI] Damage Problem

Status
Not open for further replies.
Level 1
Joined
Apr 11, 2011
Messages
63
i'm making a spell that dealt a damage like shockwave using arrow but there's something wrong with my trigger ... it supposed to deal damage once but it never stops dealing damage whenever the unit close to the arrows ... here's the trigger ...

  • Arrow Shower Movement
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer ArrowShower_Loop[2]) from 1 to ArrowShower_Counts, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ArrowShower_On[ArrowShower_Loop[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ArrowShower_Dummy[ArrowShower_Loop[2]] is alive) Equal to True
                • Then - Actions
                  • Set ArrowShower_Point[1] = (Position of ArrowShower_Dummy[ArrowShower_Loop[2]])
                  • Set ArrowShower_Point[2] = (ArrowShower_Point[1] offset by 27.00 towards (Facing of ArrowShower_Dummy[ArrowShower_Loop[2]]) degrees)
                  • Unit - Move ArrowShower_Dummy[ArrowShower_Loop[2]] instantly to ArrowShower_Point[2]
                  • Set ArrowShower_Distance[ArrowShower_Loop[2]] = (ArrowShower_Distance[ArrowShower_Loop[2]] + 27.00)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ArrowShower_Distance[ArrowShower_Loop[2]] Greater than or equal to ArrowShower_DistanceMax[ArrowShower_Loop[2]]
                    • Then - Actions
                      • Unit Group - Remove all units of ArrowShower_EnemyGroup[ArrowShower_Loop[2]] from ArrowShower_EnemyGroup[ArrowShower_Loop[2]]
                      • Unit - Kill ArrowShower_Dummy[ArrowShower_Loop[2]]
                    • Else - Actions
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within 75.00 of ArrowShower_Point[1] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is Ethereal) Not equal to True) and ((((Matching unit) is alive) Equal t and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked unit) is in ArrowShower_EnemyGroup[ArrowShower_Loop[2]]) Not equal to True
                            • Then - Actions
                              • Unit Group - Add (Picked unit) to ArrowShower_EnemyGroup[ArrowShower_Loop[2]]
                              • Unit - Cause ArrowShower_Caster[ArrowShower_Loop[2]] to damage (Picked unit), dealing 25.00 damage of attack type Chaos and damage type Universal
                            • Else - Actions
                  • Custom script: call RemoveLocation (udg_ArrowShower_Point[1])
                  • Custom script: call RemoveLocation (udg_ArrowShower_Point[2])
                • Else - Actions
                  • Set ArrowShower_Int = (ArrowShower_Int - 1)
                  • Set ArrowShower_On[ArrowShower_Loop[2]] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ArrowShower_Int Equal to 0
                    • Then - Actions
                      • Game - Display to (All players) the text: off
                      • Set ArrowShower_Counts = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top