• 🏆 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!

[GUI] Spell not working as intended

Status
Not open for further replies.
Level 6
Joined
Apr 5, 2013
Messages
154
What is wrong with this trigger? It creates a dummy unit that moves to a target location (moving is in another trigger), and when it reaches a close enough point of an enemy unit, it explodes, dealing damage to the main unit and units near it. Problem is, it's not detecting units! It just goes through them. What could be wrong?

Tidalshock_LC1 = Dummy Unit
Tidalshock_C = Caster of the spell
 

Attachments

  • trigger fcuk.png
    trigger fcuk.png
    25.4 KB · Views: 74
Level 6
Joined
Apr 5, 2013
Messages
154
  • Tidal Shock
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tidal Shock
    • Actions
      • Set Tidalshock_C = (Triggering unit)
      • Set Tidalshock_TL = (Target point of ability being cast)
      • Special Effect - Create a special effect at Tidalshock_TL using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Unit - Create 1 Wave for Neutral Passive at (Tidalshock_TL offset by 50.00 towards 0.00 degrees) facing 0.00 degrees
      • Set Tidalshock_LC1 = (Last created unit)
      • Unit - Set Tidalshock_LC1 movement speed to 900.00
      • Unit - Create 1 Wave for Neutral Passive at (Tidalshock_TL offset by 50.00 towards 90.00 degrees) facing 90.00 degrees
      • Set Tidalshock_LC2 = (Last created unit)
      • Unit - Set Tidalshock_LC2 movement speed to 900.00
      • Unit - Create 1 Wave for Neutral Passive at (Tidalshock_TL offset by 50.00 towards 180.00 degrees) facing 180.00 degrees
      • Set Tidalshock_LC3 = (Last created unit)
      • Unit - Set Tidalshock_LC3 movement speed to 900.00
      • Unit - Create 1 Wave for Neutral Passive at (Tidalshock_TL offset by 50.00 towards 270.00 degrees) facing 270.00 degrees
      • Set Tidalshock_LC4 = (Last created unit)
      • Unit - Set Tidalshock_LC4 movement speed to 900.00
      • Trigger - Turn on Tidal Shock Timer <gen>
      • Unit - Order Tidalshock_LC1 to Move To (Tidalshock_TL offset by 600.00 towards 0.00 degrees)
      • Unit - Order Tidalshock_LC2 to Move To (Tidalshock_TL offset by 600.00 towards 90.00 degrees)
      • Unit - Order Tidalshock_LC3 to Move To (Tidalshock_TL offset by 600.00 towards 180.00 degrees)
      • Unit - Order Tidalshock_LC4 to Move To (Tidalshock_TL offset by 600.00 towards 270.00 degrees)
      • Wait 1.75 seconds
      • Unit - Remove Tidalshock_LC1 from the game
      • Unit - Remove Tidalshock_LC2 from the game
      • Unit - Remove Tidalshock_LC3 from the game
      • Unit - Remove Tidalshock_LC4 from the game
  • Tidal Shock Timer
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All enemies of (Owner of Tidalshock_C)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Tidalshock_LC1) and (Position of (Picked unit))) Less than or equal to 20.00
                • Then - Actions
                  • Unit Group - Pick every unit in (Units within 200.00 of (Position of Tidalshock_LC1)) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                        • Then - Actions
                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Cold
                          • Special Effect - Create a special effect at (Position of Tidalshock_LC1) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                          • Unit - Remove Tidalshock_LC1 from the game
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Tidal Shock for Tidalshock_C) Equal to 2
                            • Then - Actions
                              • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 225.00 damage of attack type Spells and damage type Cold
                              • Special Effect - Create a special effect at (Position of Tidalshock_LC1) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                              • Unit - Remove Tidalshock_LC1 from the game
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Tidal Shock for Tidalshock_C) Equal to 3
                                • Then - Actions
                                  • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Cold
                                  • Special Effect - Create a special effect at (Position of Tidalshock_LC1) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                  • Unit - Remove Tidalshock_LC1 from the game
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                                    • Then - Actions
                                      • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 375.00 damage of attack type Spells and damage type Cold
                                      • Special Effect - Create a special effect at (Position of Tidalshock_LC1) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                      • Unit - Remove Tidalshock_LC1 from the game
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Level of Tidal Shock for Tidalshock_C) Equal to 5
                                        • Then - Actions
                                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 450.00 damage of attack type Spells and damage type Cold
                                          • Special Effect - Create a special effect at (Position of Tidalshock_LC1) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                          • Unit - Remove Tidalshock_LC1 from the game
                                        • Else - Actions
                • Else - Actions
      • Player Group - Pick every player in (All enemies of (Owner of Tidalshock_C)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Tidalshock_LC2) and (Position of (Picked unit))) Less than or equal to 20.00
                • Then - Actions
                  • Unit Group - Pick every unit in (Units within 200.00 of (Position of Tidalshock_LC2)) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                        • Then - Actions
                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Cold
                          • Special Effect - Create a special effect at (Position of Tidalshock_LC2) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                          • Unit - Remove Tidalshock_LC2 from the game
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Tidal Shock for Tidalshock_C) Equal to 2
                            • Then - Actions
                              • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 225.00 damage of attack type Spells and damage type Cold
                              • Special Effect - Create a special effect at (Position of Tidalshock_LC2) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                              • Unit - Remove Tidalshock_LC2 from the game
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Tidal Shock for Tidalshock_C) Equal to 3
                                • Then - Actions
                                  • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Cold
                                  • Special Effect - Create a special effect at (Position of Tidalshock_LC2) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                  • Unit - Remove Tidalshock_LC2 from the game
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                                    • Then - Actions
                                      • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 375.00 damage of attack type Spells and damage type Cold
                                      • Special Effect - Create a special effect at (Position of Tidalshock_LC2) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                      • Unit - Remove Tidalshock_LC2 from the game
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Level of Tidal Shock for Tidalshock_C) Equal to 5
                                        • Then - Actions
                                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 450.00 damage of attack type Spells and damage type Cold
                                          • Special Effect - Create a special effect at (Position of Tidalshock_LC2) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                          • Unit - Remove Tidalshock_LC2 from the game
                                        • Else - Actions
                • Else - Actions
      • Player Group - Pick every player in (All enemies of (Owner of Tidalshock_C)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Tidalshock_LC3) and (Position of (Picked unit))) Less than or equal to 20.00
                • Then - Actions
                  • Unit Group - Pick every unit in (Units within 200.00 of (Position of Tidalshock_LC3)) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                        • Then - Actions
                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Cold
                          • Special Effect - Create a special effect at (Position of Tidalshock_LC3) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                          • Unit - Remove Tidalshock_LC3 from the game
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Tidal Shock for Tidalshock_C) Equal to 2
                            • Then - Actions
                              • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 225.00 damage of attack type Spells and damage type Cold
                              • Special Effect - Create a special effect at (Position of Tidalshock_LC3) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                              • Unit - Remove Tidalshock_LC3 from the game
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Tidal Shock for Tidalshock_C) Equal to 3
                                • Then - Actions
                                  • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Cold
                                  • Special Effect - Create a special effect at (Position of Tidalshock_LC3) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                  • Unit - Remove Tidalshock_LC3 from the game
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                                    • Then - Actions
                                      • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 375.00 damage of attack type Spells and damage type Cold
                                      • Special Effect - Create a special effect at (Position of Tidalshock_LC3) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                      • Unit - Remove Tidalshock_LC3 from the game
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Level of Tidal Shock for Tidalshock_C) Equal to 5
                                        • Then - Actions
                                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 450.00 damage of attack type Spells and damage type Cold
                                          • Special Effect - Create a special effect at (Position of Tidalshock_LC3) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                          • Unit - Remove Tidalshock_LC3 from the game
                                        • Else - Actions
                • Else - Actions
      • Player Group - Pick every player in (All enemies of (Owner of Tidalshock_C)) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Tidalshock_LC4) and (Position of (Picked unit))) Less than or equal to 20.00
                • Then - Actions
                  • Unit Group - Pick every unit in (Units within 200.00 of (Position of Tidalshock_LC4)) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                        • Then - Actions
                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Cold
                          • Special Effect - Create a special effect at (Position of Tidalshock_LC4) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                          • Unit - Remove Tidalshock_LC4 from the game
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Tidal Shock for Tidalshock_C) Equal to 2
                            • Then - Actions
                              • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 225.00 damage of attack type Spells and damage type Cold
                              • Special Effect - Create a special effect at (Position of Tidalshock_LC4) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                              • Unit - Remove Tidalshock_LC4 from the game
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Tidal Shock for Tidalshock_C) Equal to 3
                                • Then - Actions
                                  • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Cold
                                  • Special Effect - Create a special effect at (Position of Tidalshock_LC4) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                  • Unit - Remove Tidalshock_LC4 from the game
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Tidal Shock for Tidalshock_C) Equal to 1
                                    • Then - Actions
                                      • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 375.00 damage of attack type Spells and damage type Cold
                                      • Special Effect - Create a special effect at (Position of Tidalshock_LC4) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                      • Unit - Remove Tidalshock_LC4 from the game
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Level of Tidal Shock for Tidalshock_C) Equal to 5
                                        • Then - Actions
                                          • Unit - Cause Tidalshock_C to damage (Picked unit), dealing 450.00 damage of attack type Spells and damage type Cold
                                          • Special Effect - Create a special effect at (Position of Tidalshock_LC4) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                                          • Unit - Remove Tidalshock_LC4 from the game
                                        • Else - Actions
                • Else - Actions
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
This is so un-efficient that I gave up on searching why it does not work. So, my suggestion is to redo everything and this time think before doing it.

I am too lazy to fix everything, including that it is not MUI so... I will not write the whole spell for you (sorry, too lazy to do other peoples work) I will only give suggestion how the current version of the first trigger should be re-worked:

I strongly suggest that you scrap this and take a different approach.

  • Tidal Shock
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tidal Shock
    • Actions
      • Set Tidalshock_C = (Triggering unit)
      • Set Tidalshock_TL = (Target point of ability being cast)
      • Special Effect - Create a special effect at Tidalshock_TL using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • For each (Integer IndexInt) from 0 to 3, do (Actions)
        • Loop - Actions
          • Set TempDegrees = IndexInx*90
          • Set TempPoint = Tidalshock_TL offset by 50.00 towards TempDegrees degrees
          • Unit - Create 1 Wave for Neutral Passive at TempPoint facing Degrees degrees
          • Set Tidalshock_LC[IndexInt] = (Last created unit)
          • Unit - Set Tidalshock_LC[IndexInt] movement speed to 900.00
          • Custom Script: Call RemoveLocation(udg_TempPoint)
          • Set TempPoint = Tidalshock_TL offset by 600.00 towards 180.00 degrees
          • Unit - Order Tidalshock_LC[IndexInt] to Move To TempPoint
          • Custom Script: Call RemoveLocation(udg_TempPoint)
          • Unit - Add a 1.75 second Generic expiration timer to Tidalshock_LC[IndexInt]
      • CustomScript: Call RemoveLocation(udg_Tidalshock_TL)
      • Trigger - Turn on Tidal Shock Timer <gen>
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
As nedio95 wrote, those triggers are terrible. You should re-think what you want and work on the logic of what you want to achieve. What you have right now seems to be like something you were doing without much thinking and on the run.

Looking at the way you have set the spell, I assume you're pretty new to this, so you may not even know what memory leaks are.
In short, whenever you create anything in game, it takes a tiny bit of your PC's memory. Memory leak occurs when you don't destroy the unneeded stuff - that is because that stuff (even when it serves no purpose and for it may not even be visible to you) still takes that tiny part of your PC's memory. In actual game, this can be seen as gradual FPS decreasing, until the game starts lagging.

Why I wrote about memory leaks is because you have a huge amount of them in the loop trigger you posted.
Let's assume there is only one enemy of Tidalshock_C and that enemy owns 10 units. Your trigger would check each unit. The best-case scenario (leak-wise) here is that this condition:
  • (Distance between (Position of Tidalshock_LC1) and (Position of (Picked unit))) Less than or equal to 20.00
always returns false (as in the distance is greater than 20.00). So assuming that, your trigger would after only 1 second with 1 enemy player owning 10 units produce 4400 leaks. That's really a lot for just 1 second and only 10 units! With 20 units it would get to 8400 leaks per second and that is assuming the best case scenario only!

Some other things:
Unit's maximum movement speed can be only 522, no more. Even if you set higher speed in object editor, in real game it will still be 522 max. You would have to move the unit manually via triggers.

You should take a look at the tutorial section here on hive and check these 3 topics:
- learn about arrays
- learn about loops
- learn about memory leaks

I advise the part about memory leaks first, it's imo the easiest. It is also the most important as you may have a lot of code in your map(s) that leak memory.

With those 3 topics cleared, you could be using a lot simpler and cleaner code as well as prevent mistakes like checking double times the condition
  • (Level of Tidal Shock for Tidalshock_C) Equal to 1
instead of checking that condition against number 1 one time and number 4 the other time.
Also, just for future triggers it is enough for a loop to run at a minimum of 0.03 second. Any less is really unneeded (it runs way too many times for no reason at all).

I may fix those triggers for you, however there's one thing I don't know. Does the spell need to be MUI or not? MUI means Multiple Unit Instanceability and that basically means that multiple units can cast the spell at the same time without any undesired behaviour.
If only one unit can cast it and the previous cast of the spell will always end sooner than the next one can start, it does not need to be MUI.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
It could be like this. I didn't test it, but it should work.
  • Tidal Shock start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tidal Shock
    • Actions
      • Set TS_caster = (Triggering unit)
      • Set loc1 = (Target point of ability being cast)
      • Special Effect - Create a special effect at loc1 using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • For each (Integer loop_var) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set loc2 = (loc1 offset by 50.00 towards (90.00 x (Real(loop_var))) degrees)
          • Unit - Create 1 Wave for (Owner of TS_caster) at loc2 facing (90.00 x (Real(loop_var))) degrees
          • Set TS_wave[loop_var] = (Last created unit)
          • Unit - Add a 1.75 second Generic expiration timer to TS_wave[loop_var]
          • Custom script: call RemoveLocation(udg_loc2)
          • Set loc2 = (loc1 offset by 600.00 towards (90.00 x (Real(loop_var))) degrees)
          • Unit - Order TS_wave[loop_var] to Move To loc2
          • Custom script: call RemoveLocation(udg_loc2)
      • Custom script: call RemoveLocation(udg_loc1)
      • Trigger - Turn on Tidal Shock loop <gen>
  • Tidal Shock loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set end_trigger = True
      • For each (Integer loop_var) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TS_wave[loop_var] is alive) Equal to True
            • Then - Actions
              • Set end_trigger = False
              • Set loc1 = (Position of TS_wave[loop_var])
              • Set group = (Units within 20.00 of loc1 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TS_caster)) Equal to True)))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in group) Greater than 0
                • Then - Actions
                  • Special Effect - Create a special effect at loc1 using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 200.00 of loc1 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TS_caster)) Equal to True))) and do (Actions)
                    • Loop - Actions
                      • Unit - Cause TS_caster to damage (Picked unit), dealing (75.00 + (75.00 x (Real((Level of Acid Bomb for TS_caster))))) damage of attack type Spells and damage type Cold
                  • Unit - Kill TS_wave[loop_var]
                • Else - Actions
              • Custom script: call DestroyGroup(udg_group)
              • Custom script: call RemoveLocation(udg_loc1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • end_trigger Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
end_trigger = Boolean
group = Unit group
loc1 and loc2 = Point
loop_var = Integer
target and TS_Caster = Unit
TS_Wave = Unit with Array checked


Also do note: in the triggers you posted, there was a chance for one wave to deal more damage than intended.

For example if two units were within 20.00 range of the wave, the wave would cause damage to units in 200.00 area two times! (once for each unit).
I removed that so it will now damage only once.

Another thing to note: Unit movement in WCIII is not straight from point A to point B. Units may sometimes move a bit to one side or another from the straight path. This may cause your waves to look a bit strange.
The solution for that would be to move your waves manually.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
If you are going to use a periodic trigger anyway, you might as well move the unit via triggers.

or vice versa,

If you are not going to move unit via triggers, you might not need a periodic trigger.Just create a wave unit, order wave unit to move, also use a dummy unit to cast a carrion swarm/shockwave spell in the direction of wave movement.
 
Status
Not open for further replies.
Top