• 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.

Spell Pack 1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
A spell pack made by dark_sparrow.

- this spell pack may be a little sketchy but I'll fix if there's some problems.


Keywords:
spell,pack,dark,sparrow,ice,fire,earth
Contents

dark_sparrow spell pack (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 20:40, 23rd Apr 2013 Magtheridon96: Tank-Commander's first comment sums most of it up. Here are a couple of things: - When you add and remove the crow form ability, you may be ruining...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

20:40, 23rd Apr 2013
Magtheridon96: Tank-Commander's first comment sums most of it up.

Here are a couple of things:

- When you add and remove the crow form ability, you may be ruining units who already have that ability, because if a unit already has the crow form ability, adding it and removing it will end you up with a unit that has no crow form ability. The solution to this can be found in this short tutorial I wrote several months ago: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/how-give-unit-ability-fly-201936/

- You need to make the spells configurable from some Init trigger. The special effects should be configured via string variables set in such a trigger. Same goes for things like damage, area of effect, the number of special effects spawned per spell instance, etc...
The user should not be forced to go through all the spell triggers, potentially wreaking havoc, just to change a simple, aesthetic part of the spell like a special effect path or something.

- Half the leaks are cleared, but there are still parts of your code that leak locations as shown by Tank-Commander's post. Another example of the leaks is the group leak you have in the Storm spell's looping trigger:

  • Set S_RandomUnit = (Random 1 units from (Units within 500.00 of S_TempPoint 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 en
  • Unit Group - Pick every unit in S_RandomUnit and do (Actions)
    • Loop - Actions
      • Set S_Affected = (Picked unit)
You're leaking 2 groups here. The group representing the units within a 500 range of the point matching the given conditions, and the group representing the 1 randomly picked unit.
You can fix it like this:

  • Set TempGroup1 = (Units within 500.00 of ...)
  • Set TempGroup2 = (Random 1 units from TempGroup1)
  • Unit Group - Pick every unit in TempGroup2 and do (Actions)
    • Loop - Actions
      • Set S_Affected = (Picked unit)
  • Custom script: call DestroyGroup(udg_TempGroup1)
  • Custom script: call DestroyGroup(udg_TempGroup2)
I hope this brief review helps you beef up the code.
 
Rename the file to something more appropriate, likewise it shouldn't be called "spell pack" give it a more "real" name rather than just a statement of what it is

  • Animation - Change (Picked unit) flying height to 0.00 at 1000000000.00
change it to "at 0.00" it's instant

  • Unit - Move DS_Dummy1[DS] instantly to ((Position of DS_Dummy1[DS]) offset by 20.00 towards (Facing of DS_Dummy1[DS]) degrees)
All three of these leak locations

  • Special Effect - Create a special effect at (DS_Point1 offset by 150.00 towards 90.00 degrees) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
  • Special Effect - Destroy (Last created special effect)
  • Special Effect - Create a special effect at (DS_Point1 offset by 150.00 towards 225.00 degrees) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
  • Special Effect - Destroy (Last created special effect)
  • Special Effect - Create a special effect at (DS_Point1 offset by 150.00 towards 315.00 degrees) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
  • Special Effect - Destroy (Last created special effect
This is inefficiently done, use a loop and all of them also leak locations, effect could also be configurale

  • Unit - Move Smash_Target[Smash] instantly to ((Position of Smash_Target[Smash]) offset by (Real(Smash_Speed[Smash])) towards Smash_Angle[Smash] degrees)
Another location leak, also using co-ordinates to move units, is better than the "move" GUI function, as it generates much less lag, and it bypasses the need for locations, I'd suggest checking that out in a few other resources if you want to do that - though it isn't necessary

  • Destructible - Pick every destructible within 200.00 of (Position of Smash_Target[Smash]) and do (Actions)
    • Loop - Actions
      • Destructible - Kill (Picked destructible)
You need to filter destructibles instead of just doing this (also range could be configurable) otherwise you'll destroy bridges and such, with the caster may be on, and get them stuck (and ruin environments)

  • ((Learning Hero) is in S_Casters) Equal to False
Can refer to triggering unit here

  • Set S_Hashtable = (Last created hashtable)
Why does this need a hashtables, and all the others not? (same with cold snap)

Also, why are all of the naming conventions of all of these spells (and styles) different from eachother?

  • Unit Group - Pick every unit in S_UG and do (Actions)
    • Loop - Actions
      • -------- -------------------- --------
      • -------- Loads Variables --------
      • -------- -------------------- --------
      • Set S_Caster = (Load (Key caster) of (Key (Picked unit)) in S_Hashtable)
      • Set S_Affected = (Load (Key affected) of (Key (Picked unit)) in S_Hashtable)
      • Set S_CurrentTime = (Load (Key currenttime) of (Key (Picked unit)) from S_Hashtable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • S_CurrentTime Greater than 0.00
        • Then - Actions
          • Hashtable - Save (S_CurrentTime - 0.04) as (Key currenttime) of (Key (Picked unit)) in S_Hashtable
        • Else - Actions
          • Unit - Cause S_Caster to damage S_Affected, dealing S_Damage[(Level of Storm for S_Caster)] damage of attack type Spells and damage type Normal
          • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in S_Hashtable
          • Unit Group - Remove (Picked unit) from S_UG
Cache picked unit, and why does this one have a loop timer of 0.04 when all others have 0.03? (same with cold snap?)

There's a big whole list of other minor details which need changing, but you should notice them on your own scan through

Full trigger listings for everybody else


  • Dragon Slave INIT
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Damage --------
      • Set Damage[1] = 200
      • Set Damage[2] = 300
      • Set Damage[3] = 400
      • -------- Area of Effect --------
      • Set AoE = 300
  • Dragon Slave SKILL
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dragon Slave (NEW)
    • Actions
      • -------- Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DS_Times Equal to 0
        • Then - Actions
          • Trigger - Turn on Dragon Slave LOOP <gen>
        • Else - Actions
      • -------- --------------- --------
      • Set DS_Skip = (DS_Skip + 1)
      • Set DS_Times = (DS_Times + 1)
      • -------- The Caster --------
      • Set DS_Caster[DS_Times] = (Triggering unit)
      • -------- Locations --------
      • Set DS_Point1 = (Target point of ability being cast)
      • Set DS_Point2 = (DS_Point1 offset by 500.00 towards 90.00 degrees)
      • Set DS_Point3 = (DS_Point1 offset by 500.00 towards (180.00 + 45.00) degrees)
      • Set DS_Point4 = (DS_Point1 offset by 500.00 towards (270.00 + 45.00) degrees)
      • Set DS_Point5[DS_Times] = (Target point of ability being cast)
      • -------- Creating Dummies --------
      • Unit - Create 1 Dragon Slabe for (Owner of DS_Caster[DS_Times]) at DS_Point2 facing (Angle from DS_Point2 to DS_Point1) degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Set DS_Dummy1[DS_Times] = (Last created unit)
      • Unit - Create 1 Dragon Slabe for (Owner of DS_Caster[DS_Times]) at DS_Point3 facing (Angle from DS_Point3 to DS_Point1) degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Set DS_Dummy2[DS_Times] = (Last created unit)
      • Unit - Create 1 Dragon Slabe for (Owner of DS_Caster[DS_Times]) at DS_Point4 facing (Angle from DS_Point4 to DS_Point1) degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Set DS_Dummy3[DS_Times] = (Last created unit)
      • -------- --------------- --------
      • Set DS_Off[DS_Times] = False
      • -------- ----------------- --------
      • Special Effect - Create a special effect at DS_Point1 using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at (DS_Point1 offset by 150.00 towards 90.00 degrees) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at (DS_Point1 offset by 150.00 towards 225.00 degrees) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at (DS_Point1 offset by 150.00 towards 315.00 degrees) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- --------------- --------
      • Custom script: call RemoveLocation(udg_DS_Point1)
      • Custom script: call RemoveLocation(udg_DS_Point2)
      • Custom script: call RemoveLocation(udg_DS_Point3)
      • Custom script: call RemoveLocation(udg_DS_Point4)
  • Dragon Slave LOOP
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer DS) from 1 to DS_Times, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DS_Off[DS] Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DS_Traveled[DS] Less than or equal to 500
                • Then - Actions
                  • Unit - Move DS_Dummy1[DS] instantly to ((Position of DS_Dummy1[DS]) offset by 20.00 towards (Facing of DS_Dummy1[DS]) degrees)
                  • Unit - Move DS_Dummy2[DS] instantly to ((Position of DS_Dummy2[DS]) offset by 20.00 towards (Facing of DS_Dummy2[DS]) degrees)
                  • Unit - Move DS_Dummy3[DS] instantly to ((Position of DS_Dummy3[DS]) offset by 20.00 towards (Facing of DS_Dummy3[DS]) degrees)
                  • Set DS_Traveled[DS] = (DS_Traveled[DS] + 20)
                • Else - Actions
                  • -------- ----------------- --------
                  • Set DS_Traveled[DS] = 0
                  • -------- ----------------- --------
                  • Unit - Kill DS_Dummy1[DS]
                  • Unit - Kill DS_Dummy2[DS]
                  • Unit - Kill DS_Dummy3[DS]
                  • Set DS_DamageGroup[DS] = (Units within (Real(AoE)) of DS_Point5[DS] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of DS_Caster[DS])) Equal to True)))
                  • Unit Group - Pick every unit in DS_DamageGroup[DS] and do (Actions)
                    • Loop - Actions
                      • Unit - Cause DS_Caster[DS] to damage (Picked unit), dealing (Real(Damage[(Level of Dragon Slave (NEW) for DS_Caster[DS])])) damage of attack type Spells and damage type Normal
                  • -------- ----------------- --------
                  • Custom script: call RemoveLocation(udg_DS_Point5[udg_DS])
                  • Custom script: call DestroyGroup(udg_DS_DamageGroup[udg_DS])
                  • Set DS_Skip = (DS_Skip - 1)
                  • Set DS_Off[DS] = True
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DS_Skip Equal to 0
                    • Then - Actions
                      • Set DS_Times = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions


  • Offensive State INIT
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Chance % --------
      • Set OS_Chance[1] = 15
      • Set OS_Chance[2] = 15
      • Set OS_Chance[3] = 15
      • -------- Damage --------
      • Set OS_Damage[1] = 10.00
      • Set OS_Damage[2] = 20.00
      • Set OS_Damage[3] = 30.00
  • Offensive State
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Offensive State
    • Actions
      • Set OS_Index = (OS_Index + 1)
      • Set OS_Caster[OS_Index] = (Learning Hero)
      • Trigger - Add to Offensive State Loop <gen> the event (Unit - OS_Caster[OS_Index] Takes damage)
  • Offensive State Loop
    • Events
    • Conditions
    • Actions
      • For each (Integer OS) from 1 to OS_Index, do (Actions)
        • Loop - Actions
          • Set OS_Random[OS] = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OS_Random[OS] Less than or equal to OS_Chance[(Level of Offensive State for OS_Caster[OS])]
            • Then - Actions
              • Set OS_Point = (Position of OS_Caster[OS])
              • Animation - Play OS_Caster[OS]'s Attack Walk Stand Spin animation
              • Set OS_DamageGroup[OS] = (Units within 300.00 of OS_Point matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of OS_Caster[OS])) Equal to True)))
              • Unit Group - Pick every unit in OS_DamageGroup[OS] and do (Actions)
                • Loop - Actions
                  • Unit - Cause OS_Caster[OS] to damage (Picked unit), dealing OS_Damage[(Level of Offensive State for OS_Caster[OS])] damage of attack type Hero and damage type Normal
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
                  • Special Effect - Destroy (Last created special effect)
              • Custom script: call DestroyGroup(udg_OS_DamageGroup[udg_OS])
              • Custom script: call RemoveLocation(udg_OS_Point)
            • Else - Actions


  • Smash INIT
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Damage --------
      • Set Smash_Damage[1] = 200
      • Set Smash_Damage[2] = 250
      • Set Smash_Damage[3] = 300
      • -------- Knockback Distance --------
      • Set Smash_KBDistance[1] = 200.00
      • Set Smash_KBDistance[2] = 300.00
      • Set Smash_KBDistance[3] = 400.00
      • -------- Initial Speed --------
      • Set Smash_InitialSpeed[1] = 20
      • Set Smash_InitialSpeed[2] = 25
      • Set Smash_InitialSpeed[3] = 28
  • Smash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Smash
    • Actions
      • -------- Index --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Smash_Skip Equal to 0
        • Then - Actions
          • Trigger - Turn on Smash Loop <gen>
        • Else - Actions
      • Set Smash_Skip = (Smash_Skip + 1)
      • Set Smash_Times = (Smash_Times + 1)
      • -------- Caster --------
      • Set Smash_Caster[Smash_Times] = (Triggering unit)
      • -------- Target --------
      • Set Smash_Target[Smash_Times] = (Target unit of ability being cast)
      • -------- Target Point --------
      • Set Smash_Point1[Smash_Times] = (Position of Smash_Caster[Smash_Times])
      • Set Smash_Point2[Smash_Times] = (Position of Smash_Target[Smash_Times])
      • -------- Angle --------
      • Set Smash_Angle[Smash_Times] = (Angle from Smash_Point1[Smash_Times] to Smash_Point2[Smash_Times])
      • -------- Special Effect --------
      • Special Effect - Create a special effect at Smash_Point2[Smash_Times] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Speed --------
      • Set Smash_Speed[Smash_Times] = Smash_InitialSpeed[(Level of Smash for Smash_Caster[Smash_Times])]
      • -------- Turn Collision off --------
      • Unit - Turn collision for Smash_Target[Smash_Times] Off
      • -------- Damage --------
      • Unit - Cause Smash_Caster[Smash_Times] to damage Smash_Target[Smash_Times], dealing (Real(Smash_Damage[(Level of Smash for Smash_Caster[Smash_Times])])) damage of attack type Hero and damage type Normal
      • -------- Loop = True --------
      • Set Smash_Off[Smash_Times] = False
      • -------- Removing Leak --------
      • Custom script: call RemoveLocation(udg_Smash_Point1[udg_Smash_Times])
      • Custom script: call RemoveLocation(udg_Smash_Point2[udg_Smash_Times])
  • Smash Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Smash) from 1 to Smash_Times, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Smash_Off[Smash] Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Smash_Traveled[Smash] Less than or equal to (Integer(Smash_KBDistance[(Level of Smash for Smash_Caster[Smash])]))
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Smash_Traveled[Smash] Less than or equal to (Integer(Smash_KBDistance[(Level of Smash for Smash_Caster[Smash])]))
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Smash_Speed[Smash] Less than or equal to 5
                        • Then - Actions
                        • Else - Actions
                          • Set Smash_Speed[Smash] = (Smash_Speed[Smash] - 1)
                    • Else - Actions
                  • Unit - Move Smash_Target[Smash] instantly to ((Position of Smash_Target[Smash]) offset by (Real(Smash_Speed[Smash])) towards Smash_Angle[Smash] degrees)
                  • Set Smash_Traveled[Smash] = (Smash_Traveled[Smash] + Smash_Speed[Smash])
                  • Special Effect - Create a special effect attached to the origin of Smash_Target[Smash] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Destructible - Pick every destructible within 200.00 of (Position of Smash_Target[Smash]) and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                • Else - Actions
                  • Unit - Turn collision for Smash_Target[Smash] On
                  • Set Smash_Traveled[Smash] = 0
                  • Set Smash_Skip = (Smash_Skip - 1)
                  • Set Smash_Off[Smash] = True
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Smash_Skip Equal to 0
                    • Then - Actions
                      • Set Smash_Times = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions


  • Giant Stomp INIT
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Maximum Height --------
      • Set GSD_MaximumHeight[1] = 250
      • Set GSD_MaximumHeight[2] = 250
      • Set GSD_MaximumHeight[3] = 250
      • -------- Initial Speed --------
      • Set GSD_InitialSpeed[1] = 70
      • Set GSD_InitialSpeed[2] = 70
      • Set GSD_InitialSpeed[3] = 70
      • -------- Initial Speed --------
      • Set GSD_InitialDownSpeed[1] = 40
      • Set GSD_InitialDownSpeed[2] = 40
      • Set GSD_InitialDownSpeed[3] = 40
      • -------- Damage --------
      • Set GSD_Damage[1] = 50
      • Set GSD_Damage[2] = 100
      • Set GSD_Damage[3] = 150
  • Giant Stomp
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Giant Stomp
    • Actions
      • -------- ---------------------- --------
      • -------- Indexing --------
      • -------- ---------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GSD_Skip Equal to 0
        • Then - Actions
          • Trigger - Turn on Giant Stomp Loop <gen>
        • Else - Actions
      • Set GSD_Skip = (GSD_Skip + 1)
      • Set GSD_Times = (GSD_Times + 1)
      • -------- ---------------------- --------
      • -------- CASTER --------
      • -------- ---------------------- --------
      • Set GSD_Caster[GSD_Times] = (Triggering unit)
      • -------- ---------------------- --------
      • -------- Speed --------
      • -------- ---------------------- --------
      • Set GSD_Speed[GSD_Times] = GSD_InitialSpeed[(Level of Giant Stomp for GSD_Caster[GSD_Times])]
      • Set GSD_DownSpeed[GSD_Times] = GSD_InitialDownSpeed[(Level of Giant Stomp for GSD_Caster[GSD_Times])]
      • -------- ---------------------- --------
      • -------- Caster Location --------
      • -------- ---------------------- --------
      • Set GSD_CasterPoint[GSD_Times] = (Position of GSD_Caster[GSD_Times])
      • -------- ---------------------- --------
      • -------- Current Height --------
      • -------- ---------------------- --------
      • Set GSD_CurrentHeight[GSD_Times] = 0.00
      • Set GSD_TraveledHeightDownINIT[GSD_Times] = GSD_MaximumHeight[(Level of Giant Stomp for GSD_Caster[GSD_Times])]
      • Set GSD_CurrentHeightDown[GSD_Times] = GSD_MaximumHeight[(Level of Giant Stomp for GSD_Caster[GSD_Times])]
      • -------- ---------------------- --------
      • -------- Jump Group --------
      • -------- ---------------------- --------
      • Set GSD_Jumpgroup[GSD_Times] = (Units within 300.00 of GSD_CasterPoint[GSD_Times] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of GSD_Caster[GSD_Times])) Equal to True)))
      • Unit Group - Pick every unit in GSD_Jumpgroup[GSD_Times] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current flying height of (Picked unit)) Greater than 1.00
            • Then - Actions
              • Unit - Add Crow Form to (Picked unit)
              • Unit - Remove Crow Form from (Picked unit)
            • Else - Actions
              • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Weapons\Mortar\MortarMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Add Crow Form to (Picked unit)
              • Unit - Remove Crow Form from (Picked unit)
      • -------- ---------------------- --------
      • -------- Turn on --------
      • -------- ---------------------- --------
      • Set GSD_Off[GSD_Times] = False
      • -------- ---------------------- --------
      • -------- Cleaning Leaks --------
      • -------- ---------------------- --------
      • Custom script: call RemoveLocation(udg_GSD_CasterPoint[udg_GSD_Times])
  • Giant Stomp Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer GSD) from 1 to GSD_Times, do (Actions)
        • Loop - Actions
          • -------- ---------------------- --------
          • -------- Check if GSD is off = False --------
          • -------- ---------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GSD_Off[GSD] Equal to False
            • Then - Actions
              • -------- ---------------------- --------
              • -------- Loop --------
              • -------- ---------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GSD_TraveledHeight[GSD] Less than or equal to GSD_MaximumHeight[(Level of Giant Stomp for GSD_Caster[GSD])]
                • Then - Actions
                  • -------- ---------------------- --------
                  • -------- Current Height --------
                  • -------- ---------------------- --------
                  • Set GSD_CurrentHeight[GSD] = (GSD_CurrentHeight[GSD] + (Real(GSD_Speed[GSD])))
                  • -------- ---------------------- --------
                  • -------- Traveled Height --------
                  • -------- ---------------------- --------
                  • Set GSD_TraveledHeight[GSD] = (GSD_TraveledHeight[GSD] + GSD_Speed[GSD])
                  • -------- ---------------------- --------
                  • -------- Loop Jump --------
                  • -------- ---------------------- --------
                  • Unit Group - Pick every unit in GSD_Jumpgroup[GSD] and do (Actions)
                    • Loop - Actions
                      • Set GSD_FlyingUp[GSD] = (Picked unit)
                      • Animation - Change GSD_FlyingUp[GSD] flying height to GSD_CurrentHeight[GSD] at 1000000000.00
                  • -------- ---------------------- --------
                  • -------- Gravity --------
                  • -------- ---------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GSD_Speed[GSD] Less than or equal to 10
                    • Then - Actions
                    • Else - Actions
                      • Set GSD_Speed[GSD] = (GSD_Speed[GSD] - 10)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GSD_CurrentHeightDown[GSD] Greater than or equal to 0
                    • Then - Actions
                      • -------- ---------------------- --------
                      • -------- Current Height --------
                      • -------- ---------------------- --------
                      • Set GSD_CurrentHeightDown[GSD] = (GSD_CurrentHeightDown[GSD] - GSD_DownSpeed[GSD])
                      • -------- ---------------------- --------
                      • -------- Traveled --------
                      • -------- ---------------------- --------
                      • Set GSD_TraveledHeightDown[GSD] = (GSD_TraveledHeightDown[GSD] - GSD_DownSpeed[GSD])
                      • -------- ---------------------- --------
                      • -------- Loop --------
                      • -------- ---------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • GSD_CurrentHeightDown[GSD] Greater than 30
                        • Then - Actions
                          • Unit Group - Pick every unit in GSD_Jumpgroup[GSD] and do (Actions)
                            • Loop - Actions
                              • Set GSD_FallingDown[GSD] = (Picked unit)
                              • Animation - Change (Picked unit) flying height to (Real(GSD_CurrentHeightDown[GSD])) at 1000000000.00
                        • Else - Actions
                          • Unit Group - Pick every unit in GSD_Jumpgroup[GSD] and do (Actions)
                            • Loop - Actions
                              • Set GSD_FallingDown[GSD] = (Picked unit)
                              • Special Effect - Create a special effect attached to the origin of GSD_FallingDown[GSD] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                              • Special Effect - Destroy (Last created special effect)
                              • Unit - Cause GSD_Caster[GSD] to damage GSD_FallingDown[GSD], dealing (Real(GSD_Damage[(Level of Giant Stomp for GSD_Caster[GSD])])) damage of attack type Spells and damage type Normal
                              • Animation - Change (Picked unit) flying height to 0.00 at 1000000000.00
                              • Unit Group - Remove GSD_FallingDown[GSD] from GSD_Jumpgroup[GSD]
                    • Else - Actions
                      • -------- ---------------------- --------
                      • -------- Cleaning Leaks --------
                      • -------- ---------------------- --------
                      • Set GSD_CurrentHeight[GSD] = 0.00
                      • Set GSD_CurrentHeightDown[GSD] = 0
                      • Set GSDMOVE_Traveled[GSD] = 0
                      • Set GSD_TraveledHeight[GSD] = 0
                      • Set GSD_TraveledHeightDown[GSD] = 0
                      • Custom script: call DestroyGroup(udg_GSD_Jumpgroup[udg_GSD])
                      • Set GSD_Off[GSD] = True
                      • Set GSD_Skip = (GSD_Skip - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • GSD_Skip Equal to 0
                        • Then - Actions
                          • Set GSD_Times = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
            • Else - Actions


  • Cold Snap Hashtable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Creates a Hastable --------
      • Hashtable - Create a hashtable
      • Set ColdSnap_Hastable = (Last created hashtable)
  • Cold Snap
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cold Snap
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in ColdSnap_Casters) Equal to False
        • Then - Actions
          • -------- Caster --------
          • Set ColdSnap_Caster = (Triggering unit)
          • Set ColdSnap_Target = (Target unit of ability being cast)
          • -------- Values --------
          • Set ColdSnap_Time = 5.00
          • Set ColdSnap_Damage = 50
          • Set ColdSnap_Level = (Level of Cold Snap for ColdSnap_Caster)
          • -------- =---------------= --------
          • Set ColdSnap_Angle = (Facing of ColdSnap_Target)
          • Set ColdSnap_Point1 = (Position of ColdSnap_Target)
          • -------- =---------------= --------
          • Animation - Change ColdSnap_Target's animation speed to 0.00% of its original speed
          • Special Effect - Create a special effect attached to the origin of ColdSnap_Target using Abilities\Spells\Undead\FreezingBreath\FreezingBreathMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the origin of ColdSnap_Target using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
          • Hashtable - Save Handle Of(Last created special effect) as (Key effects) of (Key (Target unit of ability being cast)) in ColdSnap_Hastable
          • -------- Stores VALUES --------
          • Hashtable - Save ColdSnap_Time as (Key time) of (Key (Target unit of ability being cast)) in ColdSnap_Hastable
          • Hashtable - Save ColdSnap_Damage as (Key damage) of (Key (Target unit of ability being cast)) in ColdSnap_Hastable
          • Hashtable - Save ColdSnap_Angle as (Key angle) of (Key (Target unit of ability being cast)) in ColdSnap_Hastable
          • Hashtable - Save Handle OfColdSnap_Point1 as (Key point) of (Key (Target unit of ability being cast)) in ColdSnap_Hastable
          • Hashtable - Save Handle OfColdSnap_Caster as (Key caster) of (Key (Target unit of ability being cast)) in ColdSnap_Hastable
          • Hashtable - Save Handle OfColdSnap_Target as (Key target) of (Key (Target unit of ability being cast)) in ColdSnap_Hastable
          • Unit Group - Add ColdSnap_Target to ColdSnap_Casters
        • Else - Actions
  • Cold Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ColdSnap_Casters and do (Actions)
        • Loop - Actions
          • -------- Loads VALUES --------
          • Set ColdSnap_Caster = (Load (Key caster) of (Key (Picked unit)) in ColdSnap_Hastable)
          • Set ColdSnap_Target = (Load (Key target) of (Key (Picked unit)) in ColdSnap_Hastable)
          • Set ColdSnap_Damage = (Load (Key damage) of (Key (Picked unit)) from ColdSnap_Hastable)
          • Set ColdSnap_Angle = (Load (Key angle) of (Key (Picked unit)) from ColdSnap_Hastable)
          • Set ColdSnap_Point1 = (Load (Key point) of (Key (Picked unit)) in ColdSnap_Hastable)
          • Set ColdSnap_Time = (Load (Key time) of (Key (Picked unit)) from ColdSnap_Hastable)
          • -------- checks time --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ColdSnap_Time Greater than 0.00
              • (ColdSnap_Target is dead) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ColdSnap_Time Equal to 1.00
                      • ColdSnap_Time Equal to 2.00
                      • ColdSnap_Time Equal to 3.00
                      • ColdSnap_Time Equal to 4.00
                      • ColdSnap_Time Equal to 5.00
                      • ColdSnap_Time Equal to 6.00
                • Then - Actions
                  • Unit - Cause ColdSnap_Caster to damage ColdSnap_Target, dealing (Real(ColdSnap_Damage)) damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the origin of ColdSnap_Target using Abilities\Spells\Undead\FreezingBreath\FreezingBreathMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
              • Unit - Move ColdSnap_Target instantly to ColdSnap_Point1, facing ColdSnap_Angle degrees
              • Hashtable - Save (ColdSnap_Time - 0.02) as (Key time) of (Key (Picked unit)) in ColdSnap_Hastable
            • Else - Actions
              • Animation - Change ColdSnap_Target's animation speed to 100.00% of its original speed
              • Special Effect - Destroy (Load (Key effects) of (Key (Picked unit)) in ColdSnap_Hastable)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in ColdSnap_Hastable
              • Custom script: call RemoveLocation(udg_ColdSnap_Point1)
              • Unit Group - Remove (Picked unit) from ColdSnap_Casters


  • Storm INIT
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Hashtable --------
      • Hashtable - Create a hashtable
      • Set S_Hashtable = (Last created hashtable)
      • -------- Damage --------
      • Set S_Damage[1] = 50.00
      • Set S_Damage[2] = 75.00
      • Set S_Damage[3] = 100.00
      • -------- Delay --------
      • Set S_Delay = 0.40
  • Storm
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Storm
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Learning Hero) is in S_Casters) Equal to False
        • Then - Actions
          • -------- Unit Group CASTERS --------
          • Unit Group - Add (Triggering unit) to S_Casters
        • Else - Actions
  • Storm Loop
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in S_Casters and do (Actions)
        • Loop - Actions
          • -------- -------------------- --------
          • -------- CASTER --------
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to True
            • Then - Actions
            • Else - Actions
              • Set S_Caster = (Picked unit)
          • -------- -------------------- --------
          • -------- CASTER POINT --------
          • -------- -------------------- --------
          • Set S_TempPoint = (Position of S_Caster)
          • -------- -------------------- --------
          • -------- TARGET --------
          • -------- -------------------- --------
          • Set S_RandomUnit = (Random 1 units from (Units within 500.00 of S_TempPoint 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 en
          • Unit Group - Pick every unit in S_RandomUnit and do (Actions)
            • Loop - Actions
              • Set S_Affected = (Picked unit)
          • -------- -------------------- --------
          • -------- TARGET POINT --------
          • -------- -------------------- --------
          • Set S_TargetPoint = (Position of S_Affected)
          • -------- -------------------- --------
          • -------- DELAY --------
          • -------- -------------------- --------
          • Set S_CurrentTime = S_Delay
          • -------- -------------------- --------
          • -------- Creates Dummy --------
          • -------- -------------------- --------
          • Unit - Create 1 Storm dummy for (Owner of S_Caster) at S_TargetPoint facing Default building facing degrees
          • Set S_Dummy = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to S_Dummy
          • Unit - Turn collision for S_Dummy Off
          • Unit - Move S_Dummy instantly to S_TargetPoint
          • Animation - Change S_Dummy flying height to 1000.00 at 1000000000.00
          • Unit - Order S_Dummy to Attack S_Affected
          • -------- -------------------- --------
          • -------- Stores Variables --------
          • -------- -------------------- --------
          • Hashtable - Save Handle OfS_Caster as (Key caster) of (Key (Last created unit)) in S_Hashtable
          • Hashtable - Save Handle OfS_Affected as (Key affected) of (Key (Last created unit)) in S_Hashtable
          • Hashtable - Save S_CurrentTime as (Key currenttime) of (Key (Last created unit)) in S_Hashtable
          • -------- -------------------- --------
          • -------- Adds unit in Unit Group --------
          • -------- -------------------- --------
          • Unit Group - Add S_Dummy to S_UG
          • -------- -------------------- --------
          • -------- CLEAN --------
          • -------- -------------------- --------
          • Custom script: call RemoveLocation(udg_S_TempPoint)
          • Custom script: call RemoveLocation(udg_S_TargetPoint)
  • Storm Delay
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in S_UG and do (Actions)
        • Loop - Actions
          • -------- -------------------- --------
          • -------- Loads Variables --------
          • -------- -------------------- --------
          • Set S_Caster = (Load (Key caster) of (Key (Picked unit)) in S_Hashtable)
          • Set S_Affected = (Load (Key affected) of (Key (Picked unit)) in S_Hashtable)
          • Set S_CurrentTime = (Load (Key currenttime) of (Key (Picked unit)) from S_Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • S_CurrentTime Greater than 0.00
            • Then - Actions
              • Hashtable - Save (S_CurrentTime - 0.04) as (Key currenttime) of (Key (Picked unit)) in S_Hashtable
            • Else - Actions
              • Unit - Cause S_Caster to damage S_Affected, dealing S_Damage[(Level of Storm for S_Caster)] damage of attack type Spells and damage type Normal
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in S_Hashtable
              • Unit Group - Remove (Picked unit) from S_UG



I'm quite concerned about all the irregularity and mismatched styles, since it leads to questioning of origin, which I'd be a liar to say I didn't have, though it takes a more observant man than me to confirm or deny those suspicions as correct.
 
Level 10
Joined
Aug 21, 2010
Messages
316
Try something like this

example 1

  • -------- Locations --------
  • Set DS_Point1 = (Target point of ability being cast)
  • Set DS_Point2 = (DS_Point1 offset by 500.00 towards 90.00 degrees)
  • Set DS_Point3 = (DS_Point1 offset by 500.00 towards (180.00 + 45.00) degrees)
  • Set DS_Point4 = (DS_Point1 offset by 500.00 towards (270.00 + 45.00) degrees)
  • Set DS_Point5[DS_Times] = (Target point of ability being cast)
  • -------- Creating Dummies --------
  • Unit - Create 1 Dragon Slabe for (Owner of DS_Caster[DS_Times]) at DS_Point2 facing (Angle from DS_Point2 to DS_Point1) degrees
  • Set DS_Dummy1[DS_Times] = (Last created unit)
  • Unit - Create 1 Dragon Slabe for (Owner of DS_Caster[DS_Times]) at DS_Point3 facing (Angle from DS_Point3 to DS_Point1) degrees
  • Set DS_Dummy2[DS_Times] = (Last created unit)
  • Unit - Create 1 Dragon Slabe for (Owner of DS_Caster[DS_Times]) at DS_Point4 facing (Angle from DS_Point4 to DS_Point1) degrees
  • Set DS_Dummy3[DS_Times] = (Last created unit)
->

  • Custom script: set udg_DS_X[0] = GetSpellTargetX()
  • Custom script: set udg_DS_Y[0] = GetSpellTargetY()
  • -------- --- --------
  • For each (Integer DS_Index) from 1 to 3, do (Actions)
    • Loop - Actions
      • Set DS_X[DS_Index] = (DS_X[0] + (500.00 x (Cos(((360.00 / 3.00) x (Real(DS_Index)))))))
      • Set DS_Y[DS_Index] = (DS_Y[0] + (500.00 x (Sin(((360.00 / 3.00) x (Real(DS_Index)))))))
      • Set DS_Angle = (Atan2((DS_Y[0] - DS_Y[DS_Index]), (DS_X[0] - DS_X[DS_Index])))
      • Unit - Create 1 Dragon Slabe for (Triggering player) at (Point(DS_X[DS_Index], DS_Y[DS_Index])) facing DS_Angle degrees
 
Top