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

[Trigger] Distort Reality by Maker

Status
Not open for further replies.
Level 7
Joined
Aug 15, 2012
Messages
318
Well I imported distort reality by Maker today tried to use it in my map I know how to import I went through everything couldn't see what the problem is I read the trigger like 5 times over couldn't tell what I did wrong or if it was just his spell. anyways if Maker or anyone could help I would appreciate it its such an awesome spell.
The initiate spell does damage but the souls that come down from the skye do 0 damage also they stack onto the unit they go to and do no do anything until the unit dies at which point they explode doing nothing.

  • DR Initialize
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- -------------------- --------
      • Hashtable - Create a hashtable
      • Set DR_Hash = (Last created hashtable)
      • -------- -------------------- --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Disable Spell Book - (DR) for (Player((Integer A)))
      • -------- -------------------- --------
      • -------- Number of lightning effects --------
      • -------- -------------------- --------
      • Set DR_Reals[0] = 8.00
      • -------- -------------------- --------
      • -------- Lightning initial offset --------
      • -------- -------------------- --------
      • Set DR_Reals[1] = 350.00
      • -------- -------------------- --------
      • -------- Lightning rotation speed --------
      • -------- -------------------- --------
      • Set DR_Reals[2] = 10.00
      • -------- -------------------- --------
      • -------- Lightning converging/diverging speed --------
      • -------- -------------------- --------
      • Set DR_Reals[3] = 10.50
      • -------- -------------------- --------
      • -------- Level 1 evasion chance --------
      • -------- -------------------- --------
      • Set DR_Reals[4] = 40.00
      • -------- -------------------- --------
      • -------- Lightning damage, base --------
      • -------- -------------------- --------
      • Set DR_Reals[5] = 5.00
      • -------- -------------------- --------
      • -------- Lightning damage, ability level bonus --------
      • -------- -------------------- --------
      • Set DR_Reals[6] = 30.00
      • -------- -------------------- --------
      • -------- Spell duration --------
      • -------- -------------------- --------
      • Set DR_Reals[7] = 10.00
      • -------- -------------------- --------
      • -------- Blinking speed --------
      • -------- -------------------- --------
      • Set DR_Reals[8] = 6.00
      • -------- -------------------- --------
      • -------- Lightning damage radius --------
      • -------- -------------------- --------
      • Set DR_Reals[9] = 48.00
      • -------- -------------------- --------
      • -------- Damage intelligence modifier; 1 means 1 point in int gives 1 % boost to spell damage --------
      • -------- -------------------- --------
      • Set DR_Reals[10] = 5.00
      • -------- -------------------- --------
      • -------- Lightning speed 2 --------
      • -------- -------------------- --------
      • Set DR_Reals[11] = 30.00
      • -------- -------------------- --------
      • -------- Spirit appearance interval, min --------
      • -------- -------------------- --------
      • Set DR_Reals[12] = 0.25
      • -------- -------------------- --------
      • -------- Spirit appearance interval, max --------
      • -------- -------------------- --------
      • Set DR_Reals[13] = 0.50
      • -------- -------------------- --------
      • -------- Turn unit collision off when spell is enabled --------
      • -------- This allows the unit to pass through anything --------
      • -------- 1 = collision is turned off, other values = collision stays on --------
      • -------- -------------------- --------
      • Set DR_Reals[14] = 1.00
      • -------- -------------------- --------
      • -------- Max values of the map --------
      • -------- -------------------- --------
      • Set DR_Reals[15] = (Min X of (Playable map area))
      • Set DR_Reals[16] = (Max X of (Playable map area))
      • Set DR_Reals[17] = (Min Y of (Playable map area))
      • Set DR_Reals[18] = (Max Y of (Playable map area))
      • -------- -------------------- --------
      • -------- Offset of moving the unit when out of map area --------
      • -------- -------------------- --------
      • Set DR_Reals[19] = 16.00
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DR_Reals[13] Less than DR_Reals[12]
        • Then - Actions
          • Set DR_Reals[13] = DR_Reals[12]
        • Else - Actions
  • Distort Reality
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |c00FF00FFDistort Reality|r
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
      • Set Temp_Real_1 = (Real((Level of |c00FF00FFDistort Reality|r for Temp_Unit_1)))
      • -------- -------------------- --------
      • Set Temp_Real_2 = (Random angle)
      • -------- -------------------- --------
      • -------- Calculate damage --------
      • -------- -------------------- --------
      • Set Temp_Real_3 = ((DR_Reals[5] + ((Real((Level of |c00FF00FFDistort Reality|r for Temp_Unit_1))) x DR_Reals[6])) x (1.00 + ((Real((Intelligence of Temp_Unit_1 (Include bonuses)))) / (100.00 / DR_Reals[10]))))
      • -------- -------------------- --------
      • Hashtable - Save Temp_Real_2 as (Key orig_angle) of (Key (Triggering unit)) in DR_Hash
      • -------- -------------------- --------
      • -------- Create lightning effects --------
      • -------- -------------------- --------
      • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
        • Loop - Actions
          • Set Temp_Loc_2 = (Temp_Loc_1 offset by DR_Reals[1] towards Temp_Real_2 degrees)
          • -------- -------------------- --------
          • Unit - Create 1 Dummy for Neutral Passive at Temp_Loc_2 facing Default building facing degrees
          • Set Temp_Unit_2 = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to Temp_Unit_2
          • -------- -------------------- --------
          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
          • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String((Integer A))))) of (Key (Triggering unit)) in DR_Hash
          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
          • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Triggering unit)) in DR_Hash
          • -------- -------------------- --------
          • Hashtable - Save Handle OfTemp_Unit_2 as (Key (dummy + (String((Integer A))))) of (Key (Triggering unit)) in DR_Hash
          • -------- -------------------- --------
          • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
          • -------- -------------------- --------
          • Custom script: call RemoveLocation(udg_Temp_Loc_2)
      • -------- -------------------- --------
      • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\NightElf\Starfall\StarfallCaster.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key starfall) of (Key (Triggering unit)) in DR_Hash
      • -------- -------------------- --------
      • Hashtable - Save 0.00 as (Key transparency) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save DR_Reals[1] as (Key offset) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save DR_Reals[7] as (Key timer) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save DR_Reals[0] as (Key effects) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save Temp_Real_3 as (Key damage) of (Key (Triggering unit)) in DR_Hash
      • Hashtable - Save (DR_Reals[4] / (DR_Reals[1] / DR_Reals[3])) as (Key trans_speed) of (Key (Triggering unit)) in DR_Hash
      • -------- -------------------- --------
      • Unit Group - Add Temp_Unit_1 to DR_Group
      • -------- -------------------- --------
      • Trigger - Turn on DR Loop <gen>
      • -------- -------------------- --------
      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
  • DR Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------- --------
      • -------- The caster loop --------
      • -------- ------------------------- --------
      • Unit Group - Pick every unit in DR_Group and do (Actions)
        • Loop - Actions
          • -------- ------------------------- --------
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_1 = (Load (Key offset) of (Key (Picked unit)) from DR_Hash)
          • Set Temp_Real_5 = (Load (Key timer) of (Key (Picked unit)) from DR_Hash)
          • -------- ------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Greater than 0.00
              • Temp_Real_5 Greater than 0.00
              • (Temp_Unit_1 is alive) Equal to True
            • Then - Actions
              • -------- ------------------------- --------
              • -------- Test for phase 1; lightnings converging --------
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_1 Greater than 0.00
                  • Temp_Real_5 Greater than or equal to DR_Reals[7]
                • Then - Actions
                  • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                  • Set Temp_Real_2 = (Load (Key orig_angle) of (Key (Picked unit)) from DR_Hash)
                  • Set Temp_Real_3 = Temp_Real_2
                  • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                  • Set Temp_Real_6 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                  • -------- ------------------------- --------
                  • -------- This makes the caster blink --------
                  • -------- ------------------------- --------
                  • Animation - Change Temp_Unit_1's vertex coloring to (100.00%, 100.00%, 100.00%) with Temp_Real_4% transparency
                  • -------- ------------------------- --------
                  • -------- Update lightning positions and damage targets --------
                  • -------- ------------------------- --------
                  • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                    • Loop - Actions
                      • Set Temp_Unit_2 = (Load (Key (dummy + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                      • -------- ------------------------- --------
                      • Set Temp_Loc_2 = (Temp_Loc_1 offset by Temp_Real_1 towards Temp_Real_2 degrees)
                      • -------- ------------------------- --------
                      • Unit - Move Temp_Unit_2 instantly to Temp_Loc_2
                      • -------- ------------------------- --------
                      • Set Temp_Group_1 = (Units within DR_Reals[9] of Temp_Loc_2)
                      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                        • Loop - Actions
                          • Set Temp_Unit_3 = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Temp_Unit_3 is alive) Equal to True
                              • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                            • Then - Actions
                              • Unit - Cause Temp_Unit_1 to damage Temp_Unit_3, dealing Temp_Real_6 damage of attack type Spells and damage type Cold
                              • Special Effect - Create a special effect attached to the chest of Temp_Unit_3 using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                      • Custom script: call DestroyGroup(udg_Temp_Group_1)
                      • -------- ------------------------- --------
                      • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
                      • -------- ------------------------- --------
                      • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                  • -------- ------------------------- --------
                  • -------- Checks whether we should progress to next phase or not --------
                  • -------- ------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Temp_Real_1 - DR_Reals[3]) Greater than 0.00
                    • Then - Actions
                      • Hashtable - Save (Temp_Real_1 - DR_Reals[3]) as (Key offset) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Temp_Real_3 + DR_Reals[2]) as (Key orig_angle) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Temp_Real_4 + (Load (Key trans_speed) of (Key (Picked unit)) from DR_Hash)) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                    • Else - Actions
                      • -------- ------------------------- --------
                      • -------- Add Evasion to caster --------
                      • -------- ------------------------- --------
                      • Unit - Add Spell Book - (DR) to Temp_Unit_1
                      • Unit - Set level of Evasion - (DR) for Temp_Unit_1 to (Level of |c00FF00FFDistort Reality|r for Temp_Unit_1)
                      • -------- ------------------------- --------
                      • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                        • Loop - Actions
                          • Special Effect - Destroy (Load (Key (effect + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                          • Special Effect - Destroy (Load (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Picked unit)) in DR_Hash)
                      • -------- ------------------------- --------
                      • Hashtable - Save (DR_Reals[7] - 0.01) as (Key timer) of (Key (Picked unit)) in DR_Hash
                      • -------- Convert current transparency percentage to radians so we can continue from there in the next phase --------
                      • Hashtable - Save ((Temp_Real_4 / 90.00) x 360.00) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Random real number between DR_Reals[12] and DR_Reals[13]) as (Key dmg_timer) of (Key (Picked unit)) in DR_Hash
                      • Special Effect - Destroy (Load (Key starfall) of (Key (Picked unit)) in DR_Hash)
                      • -------- ------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DR_Reals[14] Equal to 1.00
                        • Then - Actions
                          • Unit - Turn collision for Temp_Unit_1 Off
                        • Else - Actions
                      • -------- ------------------------- --------
                      • Unit - Create 1 Dummy for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Unit - Add DR Buff to (Last created unit)
                      • Unit - Set level of DR Buff for (Last created unit) to (Level of |c00FF00FFDistort Reality|r for Temp_Unit_1)
                      • Unit - Order (Last created unit) to Human Priest - Inner Fire Temp_Unit_1
                  • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                • Else - Actions
                  • -------- ------------------------- --------
                  • -------- Phase 2 --------
                  • -------- ------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Temp_Real_5 - 0.03) Greater than 0.00
                    • Then - Actions
                      • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                      • -------- Calculate new transparency value --------
                      • Animation - Change Temp_Unit_1's vertex coloring to (100.00%, 100.00%, 100.00%) with (DR_Reals[4] + (((90.00 - DR_Reals[4]) x (1.00 + (Sin(Temp_Real_4)))) / 2.00))% transparency
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Temp_Real_4 - DR_Reals[8]) Less than 360.00
                        • Then - Actions
                          • Hashtable - Save (Temp_Real_4 + DR_Reals[8]) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                        • Else - Actions
                          • Hashtable - Save 0.00 as (Key transparency) of (Key (Picked unit)) in DR_Hash
                      • Hashtable - Save (Temp_Real_5 - 0.03) as (Key timer) of (Key (Picked unit)) in DR_Hash
                      • -------- ------------------------- --------
                      • Set Temp_Real_5 = (Load (Key dmg_timer) of (Key (Picked unit)) from DR_Hash)
                      • -------- ------------------------- --------
                      • -------- Create spirit --------
                      • -------- ------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_5 Less than or equal to 0.00
                        • Then - Actions
                          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                          • Set Temp_Loc_2 = (Temp_Loc_1 offset by (Random real number between 1024.00 and 1536.00) towards (Random angle) degrees)
                          • -------- ------------------------- --------
                          • Unit - Create 1 Dummy for Neutral Passive at Temp_Loc_2 facing Temp_Real_4 degrees
                          • Set Temp_Unit_2 = (Last created unit)
                          • -------- -------------------- --------
                          • Unit - Add Storm Crow Form to Temp_Unit_2
                          • Unit - Remove Storm Crow Form from Temp_Unit_2
                          • -------- -------------------- --------
                          • Animation - Change Temp_Unit_2 flying height to 2000.00 at 0.00
                          • -------- ------------------------- --------
                          • Set Temp_Group_1 = (Units within 600.00 of Temp_Loc_1)
                          • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                            • Loop - Actions
                              • Set Temp_Unit_3 = (Picked unit)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Temp_Unit_3 is alive) Equal to True
                                  • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                                • Then - Actions
                                • Else - Actions
                                  • Unit Group - Remove Temp_Unit_3 from Temp_Group_1
                          • -------- ------------------------- --------
                          • -------- Pick a random target for the wisp --------
                          • -------- ------------------------- --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Temp_Group_1 is empty) Equal to False
                            • Then - Actions
                              • Set Temp_Unit_3 = (Random unit from Temp_Group_1)
                              • -------- ------------------------- --------
                              • Set Temp_Loc_3 = (Position of Temp_Unit_3)
                              • Set Temp_Real_6 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                              • -------- ------------------------- --------
                              • Unit - Make (Last created unit) face (Angle from Temp_Loc_2 to Temp_Loc_3) over 0.00 seconds
                              • -------- ------------------------- --------
                              • Hashtable - Save (Random angle) as (Key angle) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save Temp_Real_6 as (Key damage) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save Handle OfTemp_Unit_3 as (Key target) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Last created unit)) in DR_Hash
                              • Hashtable - Save (Distance between Temp_Loc_2 and Temp_Loc_3) as (Key distance) of (Key (Last created unit)) in DR_Hash
                              • -------- ------------------------- --------
                              • Custom script: call RemoveLocation(udg_Temp_Loc_3)
                            • Else - Actions
                          • Custom script: call DestroyGroup(udg_Temp_Group_1)
                          • -------- ------------------------- --------
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Weapons\DragonHawkMissile\DragonHawkMissile.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect1) of (Key (Last created unit)) in DR_Hash
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect2) of (Key (Last created unit)) in DR_Hash
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect3) of (Key (Last created unit)) in DR_Hash
                          • -------- ------------------------- --------
                          • Unit Group - Add (Last created unit) to DR_Dummy_Group
                          • -------- ------------------------- --------
                          • Hashtable - Save (Random real number between 0.09 and 0.27) as (Key dmg_timer) of (Key (Picked unit)) in DR_Hash
                          • -------- ------------------------- --------
                          • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                          • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                        • Else - Actions
                          • Hashtable - Save (Temp_Real_5 - 0.03) as (Key dmg_timer) of (Key (Picked unit)) in DR_Hash
                    • Else - Actions
                      • -------- ------------------------- --------
                      • -------- Checks whether we should progres to phase 3 --------
                      • -------- ------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Load (Key phase3) of (Key (Picked unit)) from DR_Hash) Equal to False
                        • Then - Actions
                          • Hashtable - Save True as (Key phase3) of (Key (Picked unit)) in DR_Hash
                          • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                          • Hashtable - Save 1.00 as (Key offset) of (Key (Picked unit)) in DR_Hash
                          • Hashtable - Save DR_Reals[0] as (Key effects) of (Key (Picked unit)) in DR_Hash
                          • Hashtable - Save ((Temp_Real_4 / 360.00) x 90.00) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                          • Hashtable - Save ((Load (Key transparency) of (Key (Picked unit)) from DR_Hash) / (DR_Reals[1] / DR_Reals[3])) as (Key trans_speed) of (Key (Picked unit)) in DR_Hash
                          • -------- -------------------- --------
                          • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\NightElf\Starfall\StarfallCaster.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key starfall) of (Key (Picked unit)) in DR_Hash
                          • -------- -------------------- --------
                          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                          • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                            • Loop - Actions
                              • Set Temp_Loc_2 = (Temp_Loc_1 offset by 0.00 towards Temp_Real_2 degrees)
                              • -------- -------------------- --------
                              • Unit - Create 1 Dummy for Neutral Passive at Temp_Loc_2 facing Default building facing degrees
                              • Set Temp_Unit_2 = (Last created unit)
                              • Unit - Add a 2.00 second Generic expiration timer to Temp_Unit_2
                              • -------- -------------------- --------
                              • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
                              • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash
                              • Special Effect - Create a special effect attached to the origin of Temp_Unit_2 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                              • Hashtable - Save Handle Of(Last created special effect) as (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Picked unit)) in DR_Hash
                              • -------- -------------------- --------
                              • Hashtable - Save Handle OfTemp_Unit_2 as (Key (dummy + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash
                              • -------- -------------------- --------
                              • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
                              • -------- -------------------- --------
                              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                          • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                        • Else - Actions
                          • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                          • Set Temp_Real_2 = (Load (Key orig_angle) of (Key (Picked unit)) from DR_Hash)
                          • Set Temp_Real_3 = Temp_Real_2
                          • Set Temp_Real_4 = (Load (Key transparency) of (Key (Picked unit)) from DR_Hash)
                          • Set Temp_Real_6 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                          • Animation - Change Temp_Unit_1's vertex coloring to (100.00%, 100.00%, 100.00%) with Temp_Real_4% transparency
                          • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                            • Loop - Actions
                              • Set Temp_Unit_2 = (Load (Key (dummy + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                              • -------- ------------------------- --------
                              • Set Temp_Loc_2 = (Temp_Loc_1 offset by Temp_Real_1 towards Temp_Real_2 degrees)
                              • -------- ------------------------- --------
                              • Unit - Move Temp_Unit_2 instantly to Temp_Loc_2
                              • -------- ------------------------- --------
                              • Set Temp_Group_1 = (Units within DR_Reals[9] of Temp_Loc_2)
                              • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                                • Loop - Actions
                                  • Set Temp_Unit_3 = (Picked unit)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Temp_Unit_3 is alive) Equal to True
                                      • (Temp_Unit_3 belongs to an enemy of (Owner of Temp_Unit_1)) Equal to True
                                    • Then - Actions
                                      • Unit - Cause Temp_Unit_1 to damage Temp_Unit_3, dealing Temp_Real_6 damage of attack type Spells and damage type Cold
                                      • Special Effect - Create a special effect attached to the chest of Temp_Unit_3 using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
                                      • Special Effect - Destroy (Last created special effect)
                                    • Else - Actions
                              • Custom script: call DestroyGroup(udg_Temp_Group_1)
                              • -------- ------------------------- --------
                              • Set Temp_Real_2 = (Temp_Real_2 + (360.00 / DR_Reals[0]))
                              • -------- ------------------------- --------
                              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                          • -------- ------------------------- --------
                          • -------- Checks whether we should progress to ending the spell --------
                          • -------- ------------------------- --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Temp_Real_1 - DR_Reals[3]) Less than DR_Reals[1]
                            • Then - Actions
                              • Hashtable - Save (Temp_Real_1 + DR_Reals[3]) as (Key offset) of (Key (Picked unit)) in DR_Hash
                              • Hashtable - Save (Temp_Real_3 - DR_Reals[2]) as (Key orig_angle) of (Key (Picked unit)) in DR_Hash
                              • Hashtable - Save (Temp_Real_4 - (Load (Key trans_speed) of (Key (Picked unit)) from DR_Hash)) as (Key transparency) of (Key (Picked unit)) in DR_Hash
                            • Else - Actions
                              • Hashtable - Save -1.00 as (Key timer) of (Key (Picked unit)) in DR_Hash
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Playable map area) contains Temp_Unit_1) Equal to True
                    • Then - Actions
                    • Else - Actions
                      • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                      • Set Temp_Real_1 = (X of Temp_Loc_1)
                      • Set Temp_Real_2 = (Y of Temp_Loc_1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_1 Less than DR_Reals[15]
                        • Then - Actions
                          • Custom script: call SetUnitX( udg_Temp_Unit_1 , udg_DR_Reals[15] + udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_1 Greater than DR_Reals[16]
                        • Then - Actions
                          • Custom script: call SetUnitX( udg_Temp_Unit_1 , udg_DR_Reals[16] - udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_2 Less than DR_Reals[17]
                        • Then - Actions
                          • Custom script: call SetUnitY( udg_Temp_Unit_1 , udg_DR_Reals[17] + udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Real_2 Greater than DR_Reals[18]
                        • Then - Actions
                          • Custom script: call SetUnitY( udg_Temp_Unit_1 , udg_DR_Reals[18] - udg_DR_Reals[19] )
                          • Unit - Order Temp_Unit_1 to Stop
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DR_Reals[14] Equal to 1.00
                • Then - Actions
                  • Unit - Turn collision for Temp_Unit_1 On
                • Else - Actions
              • Unit - Remove Spell Book - (DR) from Temp_Unit_1
              • -------- ------------------------- --------
              • Unit Group - Remove Temp_Unit_1 from DR_Group
              • -------- ------------------------- --------
              • Special Effect - Destroy (Load (Key starfall) of (Key (Picked unit)) in DR_Hash)
              • For each (Integer A) from 1 to (Integer(DR_Reals[0])), do (Actions)
                • Loop - Actions
                  • Special Effect - Destroy (Load (Key (effect + (String((Integer A))))) of (Key (Picked unit)) in DR_Hash)
                  • Special Effect - Destroy (Load (Key (effect + (String(((Integer(DR_Reals[0])) + (Integer A)))))) of (Key (Picked unit)) in DR_Hash)
              • -------- ------------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in DR_Hash
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DR_Group is empty) Equal to True
                  • (DR_Dummy_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
      • -------- ------------------------- --------
      • -------- The dummy loop --------
      • -------- ------------------------- --------
      • Unit Group - Pick every unit in DR_Dummy_Group and do (Actions)
        • Loop - Actions
          • -------- ------------------------- --------
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Real_1 = (Load (Key distance) of (Key (Picked unit)) from DR_Hash)
          • Set Temp_Unit_2 = (Load (Key target) of (Key (Picked unit)) in DR_Hash)
          • -------- ------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Less than 2000.00
              • (Temp_Unit_2 is alive) Equal to True
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Loc_2 = (Position of Temp_Unit_2)
              • -------- ------------------------- --------
              • Set Temp_Real_2 = (Load (Key angle) of (Key (Picked unit)) from DR_Hash)
              • Set Temp_Loc_3 = (Temp_Loc_1 offset by DR_Reals[11] towards (Angle from Temp_Loc_1 to Temp_Loc_2) degrees)
              • -------- ------------------------- --------
              • Unit - Move Temp_Unit_1 instantly to Temp_Loc_3
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current flying height of Temp_Unit_1) Greater than 50.00
                • Then - Actions
                  • Animation - Change Temp_Unit_1 flying height to ((Current flying height of Temp_Unit_1) x 0.90) at 0.00
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current flying height of Temp_Unit_1) Less than 50.00
                  • (Distance between Temp_Loc_2 and Temp_Loc_3) Less than or equal to 48.00
                • Then - Actions
                  • Set Temp_Unit_3 = (Load (Key caster) of (Key (Picked unit)) in DR_Hash)
                  • Set Temp_Real_3 = (Load (Key damage) of (Key (Picked unit)) from DR_Hash)
                  • -------- ------------------------- --------
                  • Unit - Cause Temp_Unit_3 to damage Temp_Unit_2, dealing Temp_Real_3 damage of attack type Spells and damage type Cold
                  • -------- This makes the unit to be removed from the group during the next loop --------
                  • Hashtable - Save 10000.00 as (Key distance) of (Key (Picked unit)) in DR_Hash
                • Else - Actions
                  • Hashtable - Save (Distance between Temp_Loc_2 and Temp_Loc_3) as (Key distance) of (Key (Picked unit)) in DR_Hash
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • Custom script: call RemoveLocation(udg_Temp_Loc_3)
            • Else - Actions
              • Unit Group - Remove Temp_Unit_1 from DR_Dummy_Group
              • -------- ------------------------- --------
              • Unit - Add a 1.00 second Generic expiration timer to Temp_Unit_1
              • -------- ------------------------- --------
              • Special Effect - Destroy (Load (Key effect1) of (Key (Picked unit)) in DR_Hash)
              • Special Effect - Destroy (Load (Key effect2) of (Key (Picked unit)) in DR_Hash)
              • Special Effect - Destroy (Load (Key effect3) of (Key (Picked unit)) in DR_Hash)
              • -------- ------------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in DR_Hash
              • -------- ------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DR_Group is empty) Equal to True
                  • (DR_Dummy_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top