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

Harpy Tornado v1.4

  • Like
Reactions: Yama
The Harpy Queen creates tornados which will damage the enemy, and will be cycloned over time.
|n|n|cffffcc00Level 1|r - Summons 3 tornado, which moves 250 unit, damages nearby enemy by 75 and they are cycloned last for 3 seconds.
|n|cffffcc00Level 2|r - Summons 6 tornado, which moves 500 unit, damages nearby enemy by 150 and they are cycloned last for 4 seconds.
|n|cffffcc00Level 3|r - Summons 9 tornado, which moves 750 unit, damages nearby enemy by 225 and they are cyclone last for 5 seconds.

  • Harpy Tornado Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Harpy Tornado
    • Actions
      • Set Degrees = 0.00
      • Set Caster_Point = (Position of (Triggering unit))
      • Set Level = (Level of Harpy Tornado for (Triggering unit))
      • Set Tornado_Count = (Level x 3)
      • Set TriggeringPlayer = (Triggering player)
      • Set Travel_Range = ((Real(Level)) x 250.00)
      • Set Speed = 340.00
      • Set Damage = ((Real(Level)) x 75.00)
      • For each (Integer A) from 1 to Tornado_Count, do (Actions)
        • Loop - Actions
          • Set Caster_Point2 = (Caster_Point offset by 100.00 towards Degrees degrees)
          • Unit - Create 1 Tornado Dummy for TriggeringPlayer at Caster_Point2 facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Harpy_Group
          • Set TempKey = (Key (Last created unit))
          • Hashtable - Save Travel_Range as 1 of TempKey in Harpy_Hashtable
          • Hashtable - Save Speed as 2 of TempKey in Harpy_Hashtable
          • Hashtable - Save Degrees as 3 of TempKey in Harpy_Hashtable
          • Hashtable - Save Damage as 4 of TempKey in Harpy_Hashtable
          • Hashtable - Save Level as 5 of TempKey in Harpy_Hashtable
          • Set Degrees = (Degrees + (360.00 / (Real(Tornado_Count))))
          • Custom script: call RemoveLocation(udg_Caster_Point2)
      • Custom script: call RemoveLocation(udg_Caster_Point)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Harpy Tornado Effect <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Harpy Tornado Effect <gen>
        • Else - Actions
  • Harpy Tornado Effect
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Harpy_Group and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Unit - Turn collision for TempUnit Off
          • Set TempKey = (Key (Picked unit))
          • Set Travel_Range = (Load 1 of TempKey from Harpy_Hashtable)
          • Set Speed = (Load 2 of TempKey from Harpy_Hashtable)
          • Set Degrees = (Load 3 of TempKey from Harpy_Hashtable)
          • Set Damage = (Load 4 of TempKey from Harpy_Hashtable)
          • Set Level = (Load 5 of TempKey from Harpy_Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Travel_Range Greater than or equal to 0.00
            • Then - Actions
              • Set TempPoint1 = (Position of TempUnit)
              • Set TempPoint2 = (TempPoint1 offset by (Speed x 0.03) towards Degrees degrees)
              • Special Effect - Create a special effect at TempPoint1 using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 150.00 of TempPoint2) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) belongs to an enemy of (Owner of TempUnit)) Equal to True
                      • ((Picked unit) is in Harpy_Damaged_UnitGroup) Equal to False
                    • Then - Actions
                      • Set TempPoint3 = (Position of (Picked unit))
                      • Unit Group - Add (Picked unit) to Harpy_Damaged_UnitGroup
                      • Unit - Cause TempUnit to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Normal
                      • Unit - Create 1 Cyclone for (Owner of TempUnit) at TempPoint3 facing Default building facing degrees
                      • Unit - Set level of Cyclone for (Last created unit) to Level
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone (Picked unit)
                      • Custom script: call RemoveLocation(udg_TempPoint3)
                    • Else - Actions
              • Destructible - Pick every destructible within 150.00 of TempPoint1 and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current life of (Picked destructible)) Greater than or equal to 0.00
                    • Then - Actions
                      • Unit - Order Harvest to Harvest (Picked destructible)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Current order of Harvest) Equal to (Order(harvest))
                        • Then - Actions
                          • Destructible - Kill (Picked destructible)
                        • Else - Actions
                          • Unit - Order Harvest to Stop
                    • Else - Actions
              • Unit - Move TempUnit instantly to TempPoint2
              • Hashtable - Save (Travel_Range - (Speed x 0.03)) as 1 of TempKey in Harpy_Hashtable
              • Custom script: call RemoveLocation(udg_TempPoint1)
              • Custom script: call RemoveLocation(udg_TempPoint2)
            • Else - Actions
              • Unit Group - Remove TempUnit from Harpy_Group
              • Hashtable - Clear all child hashtables of child TempKey in Harpy_Hashtable
              • Unit - Remove TempUnit from the game
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Harpy_Group is empty) Equal to True
                • Then - Actions
                  • Unit Group - Remove all units from Harpy_Damaged_UnitGroup
                  • Trigger - Turn off (This trigger)
                • Else - Actions

Keywords:
Warcraft, Tornado, Harpy, Queen, Spell, Destructible Destroy.
Contents

Harpy Queen v1.4 (Map)

Reviews
16 Dec 2011 Bribe: The code looks very good now. Approved 3/5 (useful). Please apply the changes below for a better rating. What I meant by referencing the "Level" variable was to change the code to be like this: Set Level = (Level of A000...

Moderator

M

Moderator

16 Dec 2011
Bribe: The code looks very good now. Approved 3/5 (useful). Please apply the changes below for a better rating.

What I meant by referencing the "Level" variable was to change the code to be like this:

  • Set Level = (Level of A000 for (Triggering unit))
  • Set Tornado_Count = (Level x 3)
  • Set Caster_Point = (Position of (Triggering unit))
  • Set TriggeringPlayer = (Triggering player)
  • Set Travel_Range = ((Real(Level)) x 250.00)
  • Set Speed = 340.00
  • Set Damage = ((Real(Level)) x 75.00)
I now see the point of your TempGroup2 variable yeah it does make sense to me now to put it back on the line that you used to have it on. Sorry about that. The place you had it before is the best place for it. However, you should change the name to something like "Harpy_Group" to make it unique to your own spell.

I also recommend instead of a variable named "LastCreatedUnit" you could use "TempKey" (temporary hashtable key).

You should reference your variable "TempUnit" instead of calling (Picked unit) so many times (in the effect trigger). Well, reference "PickedUnit" I guess. Why do you have two variables that point to the same unit? A bit strange. Well just leave it as it is if it's too confusing. It doesn't break the spell it just could use some work for best results.

Please use the custom script "set bj_wantDestroyGroup = true" instead of setting your "TempGroup" variable. Currently it doesn't but it "could" cause leaks in rare cases. Better to just use "Custom script: set bj_wantDestroyGroup = true" right before picking all units. This way you don't need an extra group variable too.
 
Bribe: (Position of (Triggering unit)) leaks. I also recommend setting before entering the loop.

(Owner of (Triggering unit)) could be (Triggering player) and it should also be set before entering the loop.

(Level of A000 for (Triggering unit)) should also be set before entering the loop.

(Key (Last created unit)) should be set once to a variable so you don't call it so many times.

Your script has other memory leaks and needs more attention to patching up other holes. Currently there is too much work that needs to be done to this to list it all.

You forgot to mention the inapproapriate screenshot :trollface:
 
Top