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

Windcutter v 1.5

Level 1: Summons 3 magically enchanted blades spinning around the target point dealing 33 damage per second to the units in the circle lasts for 3 seconds.
Level 2: Summons 4 magically enchanted blades spinning around the target point dealing 66 damage per second to the units in the circle lasts for 4 seconds.
Level 3: Summons 5 magically enchanted blades spinning around the target point dealing 99 damage per second to the units in the circle lasts for 5 seconds.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Set WMax = 2
      • Set WRecycledList[0] = WLastRecycled
      • For each (Integer A) from 1 to WMax, do (Actions)
        • Loop - Actions
          • Custom script: set udg_WDummyGroup[GetForLoopIndexA()] = CreateGroup()
      • -------- Configurables on each level --------
      • -------- Damage is dealt by every 0.03 second interval --------
      • -------- If you set the blades to a high value, it could make massive lag --------
      • -------- Level 1 --------
      • Set Damage[1] = 1.00
      • Set Duration[1] = 3.00
      • Set Blades[1] = 3
      • -------- Level 2 --------
      • Set Damage[2] = 2.00
      • Set Duration[2] = 4.00
      • Set Blades[2] = 4
      • -------- Level 3 --------
      • Set Damage[3] = 3.00
      • Set Duration[3] = 5.00
      • Set Blades[3] = 5
  • Windcutter
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Windcutter
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WHas[WLastRecycled] Equal to True
        • Then - Actions
          • Set WMax = (WMax + 1)
          • Set WLastRecycled = WMax
          • Set WIndex = WLastRecycled
          • Set WLastRecycled = WRecycledList[WLastRecycled]
          • Custom script: set udg_WDummyGroup[udg_WIndex] = CreateGroup()
        • Else - Actions
          • Set WIndex = WLastRecycled
          • Set WLastRecycled = WRecycledList[WLastRecycled]
      • Set WCaster[WIndex] = (Triggering unit)
      • Set WTargetPoint[WIndex] = (Target point of ability being cast)
      • Set WDamage[WIndex] = Damage[(Level of Windcutter for WCaster[WIndex])]
      • Set WTimer[WIndex] = Duration[(Level of Windcutter for WCaster[WIndex])]
      • Set WBlades = Blades[(Level of Windcutter for WCaster[WIndex])]
      • For each (Integer A) from 1 to WBlades, do (Actions)
        • Loop - Actions
          • Set TempPoint = (WTargetPoint[WIndex] offset by 150.00 towards ((360.00 / (Real(WBlades))) x (Real((Integer A)))) degrees)
          • Unit - Create 1 Wind for (Owner of WCaster[WIndex]) at TempPoint facing ((Angle from WTargetPoint[WIndex] to TempPoint) + 90.00) degrees
          • Unit Group - Add (Last created unit) to WDummyGroup[WIndex]
          • Animation - Change (Last created unit)'s animation speed to (Random real number between 25.00 and 50.00)% of its original speed
          • Unit - Create 1 Windcutter for (Owner of WCaster[WIndex]) at TempPoint facing ((Angle from WTargetPoint[WIndex] to TempPoint) + 90.00) degrees
          • Unit Group - Add (Last created unit) to WDummyGroup[WIndex]
          • Custom script: call RemoveLocation (udg_TempPoint)
      • Set WHas[WIndex] = True
      • Set WCount = (WCount + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Windcutter Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Windcutter Loop <gen>
          • Trigger - Turn on Crush Effect <gen>
        • Else - Actions
  • Windcutter Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer WInteger) from 0 to WMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WHas[WInteger] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • WTimer[WInteger] Greater than 0.00
                • Then - Actions
                  • Set WTimer[WInteger] = (WTimer[WInteger] - 0.03)
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 400.00 of WTargetPoint[WInteger] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Ow and do (Actions)
                    • Loop - Actions
                      • Unit - Cause WCaster[WInteger] to damage (Picked unit), dealing WDamage[WInteger] damage of attack type Spells and damage type Normal
                  • Unit Group - Pick every unit in WDummyGroup[WInteger] and do (Actions)
                    • Loop - Actions
                      • Set TempPoint = (Position of (Picked unit))
                      • Set TempPoint2 = (WTargetPoint[WInteger] offset by 150.00 towards ((Angle from WTargetPoint[WInteger] to TempPoint) + 10.00) degrees)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Picked unit)) Equal to Wind
                        • Then - Actions
                          • Set TempPoint3 = (WTargetPoint[WInteger] offset by (Random real number between 300.00 and 350.00) towards ((Angle from WTargetPoint[WInteger] to TempPoint) + 10.00) degrees)
                          • Unit - Move (Picked unit) instantly to TempPoint3, facing ((Angle from WTargetPoint[WInteger] to TempPoint) + 90.00) degrees
                          • Custom script: call RemoveLocation (udg_TempPoint3)
                        • Else - Actions
                          • Unit - Move (Picked unit) instantly to TempPoint2, facing ((Angle from WTargetPoint[WInteger] to TempPoint2) + 90.00) degrees
                      • Custom script: call RemoveLocation (udg_TempPoint)
                      • Custom script: call RemoveLocation (udg_TempPoint2)
                • Else - Actions
                  • Unit Group - Pick every unit in WDummyGroup[WInteger] and do (Unit - Kill (Picked unit))
                  • Set WHas[WInteger] = False
                  • Set WCount = (WCount - 1)
                  • Custom script: call RemoveLocation (udg_WTargetPoint[udg_WInteger])
                  • Unit Group - Remove all units from WDummyGroup[WInteger]
                  • Set WRecycledList[WInteger] = WLastRecycled
                  • Set WLastRecycled = WInteger
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • WCount Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Trigger - Turn off Crush Effect <gen>
                    • Else - Actions
            • Else - Actions
  • Crush Effect
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer WInteger) from 1 to WMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WHas[WInteger] Equal to True
            • Then - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 400.00 of WTargetPoint[WInteger] matching ((((Matching unit) belongs to an enemy of (Owner of WCaster[WInteger])) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matchi and do (Actions)
                • Loop - Actions
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
                  • Special Effect - Destroy (Last created special effect)
            • Else - Actions
v1.5
got rid of the arrayed temp point variables
modified trigger part mentioned at other spells
v1.4
added init trigger configurables:
  • number of blades
  • damage
  • duration
rewritten indexing
v1.3
made a much more better recycling system
added extra configurable: number of blades
v1.2
uses less dummy
leaks cleared
v1.1
Changed the hit effect
Reduced lagg
Fixed hotkey
Added extra wind effect
v1.0
Made the spell


Keywords:
magic, blade, damage, bleed, spinning, aoe
Contents

Just another Warcraft III map (Map)

Reviews
15:48, 24th Feb 2011 The_Reborn_Devil: My review Status: Approved Rating: Useful
Level 22
Joined
Dec 31, 2006
Messages
2,216
Moderator review:
The triggering looks ok, but there's no need to destroy WDummyGroup. Just clear it. Your recycling could be better too, but it's ok. Btw, in the loop in your Init trigger, just do this:
  • Custom script: set udg_WDummyGroup[GetForLoopIndexA()] = CreateGroup()
More efficient ^^
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
In the Init trigger the Integer A loop should loop from 1 to WMax

As said the indexing is kind of meh, looping 100 times even if only one instance is on. And yes I know that you can lower that value but then the safety will be reduced too when you think about it.

It should be mentioned that the damage value is damaged to the units for 1/0.03 times every second.

Else it looks good enough to get approved I guess.
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
In the Init trigger the Integer A loop should loop from 1 to WMax

As said the indexing is kind of meh, looping 100 times even if only one instance is on. And yes I know that you can lower that value but then the safety will be reduced too when you think about it.

It should be mentioned that the damage value is damaged to the units for 1/0.03 times every second.

Else it looks good enough to get approved I guess.

Heh I was a little lazy ~.~ My other spells counts to the max.

It's easy to calculate what number would be the best for a map.

The damage is okay, I think. Now it deals the damage constantly and it looks nice.
 
Top