• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Impede Vortices

Status
Not open for further replies.
Impede Vortices v1.1

EDIT: OKAY, this thread should be closed now coz I'm gonna reply in the spell section...

Hello Hivers!...I made a spell called 'Impede Vortex', I submitted it and got rejected because of leaks...I really dont understand why it has leaks coz I've already fixed it, now I'm changing the name to 'Impede Vortices' (Maker's suggestion)...

BTW, the one I submitted is 0.2, now its v1.1 which is very different...

DESCRIPTION:

Creates two Vortices, one rotates clockwise and the other counter-clockwise. Any enemy unit that is inside the circle will have speed and attack reduction of 70%. When the Vortices dies, it separates into 12, dealing 100 damage to every enemy ground units in a line.
Level 1 - Vortices AoE is 300, lasts 10 seconds.
Level 2 - Vortices AoE is 400, lasts 20 seconds.
Level 3 - Vortices AoE is 500, lasts 30 seconds.
Level 4 - Vortices AoE is 600, lasts 40 seconds.
Level 5 - Vortices AoE is 700, lasts 50 seconds.

Map Available but I posted the triggers anyway...

TRIGGERS:


  • Impede Vortices
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Impede Vortex
    • Actions
      • Trigger - Turn on Impede Vortices Loop <gen>
      • Set IV_Caster = (Triggering unit)
      • Set IV_Timer = (10.00 x (Real((Level of Impede Vortex for IV_Caster))))
      • Set IV_Wait = 0.00
      • Set IV_Size = (200.00 + (100.00 x (Real((Level of Impede Vortex for IV_Caster)))))
      • Set IV_Reach = (200.00 + (150.00 x (Real((Level of Impede Vortex for IV_Caster)))))
      • Hashtable - Save IV_Wait as 0 of (Key (Triggering unit)) in Hash
      • Hashtable - Save IV_Reach as (Key reach) of (Key (Triggering unit)) in Hash
      • Hashtable - Save IV_Size as (Key downoffset) of (Key (Triggering unit)) in Hash
      • Hashtable - Save IV_Size as (Key upoffset) of (Key (Triggering unit)) in Hash
      • Hashtable - Save 0.00 as (Key uprotation) of (Key (Triggering unit)) in Hash
      • Hashtable - Save 0.00 as (Key downrotation) of (Key (Triggering unit)) in Hash
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Unit Group - Add (Triggering unit) to IV_VortexGrp
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • -------- Down Dummy --------
      • Set IV_CenterLoc1 = (Position of IV_Caster)
      • Unit - Create 1 Blue Vortex for (Owner of IV_Caster) at IV_CenterLoc1 facing IV_CenterLoc1
      • Unit - Add a IV_Timer second Generic expiration timer to (Last created unit)
      • Hashtable - Save Handle Of(Last created unit) as (Key down) of (Key (Triggering unit)) in Hash
      • Custom script: call RemoveLocation(udg_IV_CenterLoc1)
      • -------- Up Dummy --------
      • Set IV_CenterLoc1 = (Position of IV_Caster)
      • Unit - Create 1 Fire Vortex for (Owner of IV_Caster) at IV_CenterLoc1 facing IV_CenterLoc1
      • Unit - Add a IV_Timer second Generic expiration timer to (Last created unit)
      • Hashtable - Save Handle Of(Last created unit) as (Key up) of (Key (Triggering unit)) in Hash
      • Custom script: call RemoveLocation(udg_IV_CenterLoc1)



  • Impede Vortices Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in IV_VortexGrp and do (Actions)
        • Loop - Actions
          • Hashtable - Save Handle Of(Picked unit) as (Key center) of (Key (Picked unit)) in Hash
          • Set IV_CenterLoc2 = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Load (Key down) of (Key (Picked unit)) in Hash) is alive) Equal to True
              • ((Load (Key up) of (Key (Picked unit)) in Hash) is alive) Equal to True
            • Then - Actions
              • Set IV_DownRotation = (Load (Key downrotation) of (Key (Picked unit)) from Hash)
              • Set IV_UpRotation = (Load (Key uprotation) of (Key (Picked unit)) from Hash)
              • Set IV_DownOffset = (Load (Key downoffset) of (Key (Picked unit)) from Hash)
              • Set IV_UpOffset = (Load (Key upoffset) of (Key (Picked unit)) from Hash)
              • Set IV_Reach = (Load (Key reach) of (Key (Picked unit)) from Hash)
              • Set IV_Wait = (Load 0 of (Key (Picked unit)) from Hash)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IV_Wait Greater than or equal to 1.50
                • Then - Actions
                  • Set IV_SlowGrp = (Units within IV_Reach of IV_CenterLoc2 matching ((((Matching unit) has buff slow vortex ) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an enemy of (Ow
                  • Unit Group - Pick every unit in IV_SlowGrp and do (Actions)
                    • Loop - Actions
                      • Set IV_SlowCasterLoc = (Position of (Picked unit))
                      • Unit - Create 1 Dummy (slow caster) for (Owner of IV_Caster) at IV_SlowCasterLoc facing Default building facing degrees
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                      • Custom script: call RemoveLocation(udg_IV_SlowCasterLoc)
                  • Set IV_Wait = 0.00
                  • Hashtable - Save IV_Wait as 0 of (Key (Picked unit)) in Hash
                  • Custom script: call DestroyGroup(udg_IV_SlowGrp)
                • Else - Actions
                  • Set IV_Wait = ((Load 0 of (Key (Picked unit)) from Hash) + 0.05)
                  • Hashtable - Save IV_Wait as 0 of (Key (Picked unit)) in Hash
              • -------- DOWN --------
              • Set IV_Vortex1 = ((Position of (Picked unit)) offset by IV_DownOffset towards IV_DownRotation degrees)
              • Hashtable - Save IV_DownOffset as (Key downoffset) of (Key (Picked unit)) in Hash
              • Unit - Move (Load (Key down) of (Key (Picked unit)) in Hash) instantly to IV_Vortex1
              • Set IV_DownRotation = (IV_DownRotation + 10.00)
              • Hashtable - Save IV_DownRotation as (Key downrotation) of (Key (Picked unit)) in Hash
              • Custom script: call RemoveLocation(udg_IV_Vortex1)
              • -------- UP --------
              • Set IV_Vortex2 = ((Position of (Picked unit)) offset by IV_UpOffset towards IV_UpRotation degrees)
              • Hashtable - Save IV_DownOffset as (Key upoffset) of (Key (Picked unit)) in Hash
              • Unit - Move (Load (Key up) of (Key (Picked unit)) in Hash) instantly to IV_Vortex2
              • Set IV_UpRotation = (IV_UpRotation - 10.00)
              • Hashtable - Save IV_UpRotation as (Key uprotation) of (Key (Picked unit)) in Hash
              • Custom script: call RemoveLocation(udg_IV_CenterLoc2)
            • Else - Actions
              • Unit Group - Remove (Picked unit) from IV_VortexGrp
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hash
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (IV_VortexGrp is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions



  • Fire Vortex Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Fire Vortex
    • Actions
      • Hashtable - Save 0.00 as (Key firedeg) of (Key (Triggering unit)) in Hash
      • For each (Integer IV_Fire_Loop) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set IV_Fire_Deg = (Load (Key firedeg) of (Key (Triggering unit)) from Hash)
          • Set IV_Fire_Pt1 = (Position of (Triggering unit))
          • Hashtable - Save Handle OfIV_Fire_Pt1 as 0 of (Key (Triggering unit)) in Hash
          • Set IV_Fire_Pt1 = (Load 0 of (Key (Triggering unit)) in Hash)
          • Unit - Create 1 Fire Vortex (caster) for (Owner of (Triggering unit)) at IV_Fire_Pt1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set IV_Fire_Pt2 = (IV_Fire_Pt1 offset by 20.00 towards IV_Fire_Deg degrees)
          • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire IV_Fire_Pt2
          • Custom script: call RemoveLocation(udg_IV_Fire_Pt1)
          • Custom script: call RemoveLocation(udg_IV_Fire_Pt2)
          • Set IV_Fire_Deg = (IV_Fire_Deg + 30.00)
          • Hashtable - Save IV_Fire_Deg as (Key firedeg) of (Key (Triggering unit)) in Hash
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IV_Fire_Deg Greater than or equal to 360.00
            • Then - Actions
              • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Hash
            • Else - Actions



  • Blue Vortex Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Blue Vortex
    • Actions
      • Hashtable - Save 0.00 as (Key bluedeg) of (Key (Triggering unit)) in Hash
      • For each (Integer IV_Blue_Loop) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set IV_Blue_Deg = (Load (Key bluedeg) of (Key (Triggering unit)) from Hash)
          • Set IV_Blue_Pt1 = (Position of (Triggering unit))
          • Hashtable - Save Handle OfIV_Blue_Pt1 as 0 of (Key (Triggering unit)) in Hash
          • Set IV_Blue_Pt1 = (Load 0 of (Key (Triggering unit)) in Hash)
          • Unit - Create 1 Blue Vortex (caster) for (Owner of (Triggering unit)) at IV_Blue_Pt1 facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set IV_Blue_Pt2 = (IV_Blue_Pt1 offset by 20.00 towards IV_Blue_Deg degrees)
          • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire IV_Blue_Pt2
          • Custom script: call RemoveLocation(udg_IV_Blue_Pt1)
          • Custom script: call RemoveLocation(udg_IV_Blue_Pt2)
          • Set IV_Blue_Deg = (IV_Blue_Deg + 30.00)
          • Hashtable - Save IV_Blue_Deg as (Key bluedeg) of (Key (Triggering unit)) in Hash
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IV_Blue_Deg Greater than or equal to 360.00
            • Then - Actions
              • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Hash
            • Else - Actions



167625-albums4053-picture40463.jpg


167625-albums4053-picture40462.jpg

 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
You should report or PM the moderator who rejected this spells when you're done cleaning the leaks
You can PM him and tell him a brief of your "fixing"
He'll understand
By the way, I saw your spell on the Spell Section, it's not Rejected, it "Needs fix" so don't worry, you still have chance
Explain to him
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
These are the leaks you had:

Two in Impede Vortex Dummy:
  • Unit - Create 1 Vortex Down for (Owner of IV_Caster) at (IV_CenterLoc2 offset by IV_DownOffset towards IV_DownRotation degrees) facing IV_CenterLoc2
  • Unit - Create 1 Vortex Up for (Owner of IV_Caster) at (IV_CenterLoc2 offset by IV_UpOffset towards IV_UpRotation degrees) facing IV_CenterLoc2
And two in Impede Vortex Loop:
  • Unit - Move (Load (Key down) of (Key (Picked unit)) in Hash) instantly to (IV_CenterLoc3 offset by IV_DownOffset towards IV_DownRotation degrees)
  • Unit - Move (Load (Key up) of (Key (Picked unit)) in Hash) instantly to (IV_CenterLoc3 offset by IV_UpOffset towards IV_UpRotation degrees)

These are the leaks you have now:

Two in Impede Vortices loop:
  • Unit - Move (Load (Key down) of (Key (Picked unit)) in Hash) instantly to (IV_CenterLoc2 offset by IV_DownOffset towards IV_DownRotation degrees)
  • Unit - Move (Load (Key up) of (Key (Picked unit)) in Hash) instantly to (IV_CenterLoc2 offset by IV_UpOffset towards IV_UpRotation degrees)
And this is unnecessary:
  • Hashtable - Save Handle Of(Position of (Picked unit)) as (Key pos) of (Key (Picked unit)) in Hash
  • Set IV_CenterLoc2 = (Load (Key pos) of (Key (Picked unit)) in Hash)
Just do this:
  • Set IV_CenterLoc2 = Position of (Picked unit)
And remove this from the else-if block:
  • Custom script: call RemoveLocation(udg_IV_CenterLoc2)
That variable isn't set at that point.

Then, in your Fire Vortex trigger you got this which leaks:
  • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire (IV_Fire_Pt offset by 20.00 towards IV_Fire_Deg degrees)
And in Blue Vortex you got a similar leak:
  • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire (IV_Blue_Pt offset by 20.00 towards IV_Blue_Deg degrees)
Stuff like this: "(IV_Blue_Pt offset by 20.00 towards IV_Blue_Deg degrees)" create locations and they must be stored in variables and destroyed, like this:
  • Set TempLocation = (IV_Blue_Pt offset by 20.00 towards IV_Blue_Deg degrees)
  • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire TempLocation
  • Custom script: call RemoveLocation(udg_TempLocation)
I hope that helps.
 
Status
Not open for further replies.
Top