Freezing Ray 1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Type:No Target
Category:GUI,Hashtables


Shoots a line of frost infront of the caster up to 500 range;
The caster is able to increase the range of the beam; but only to 500. Any unit caught in the line will be dealt 0.2% of the casters mana; the caster's mana drains by 2% a second. Also decreases movement speed.

sy3MN.jpg



  • Freezing Ray Int
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Freezing Ray
    • Actions
      • Trigger - Turn on Freezing Ray Loop <gen>
      • -------- ------------------------------------- --------
      • -------- Unit Constants --------
      • -------- ------------------------------------- --------
      • Hashtable - Save Handle Of(Triggering unit) as 0 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save Handle Of(Owner of (Load 0 of (Key (Triggering unit)) in FR_Hashtable)) as 1 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save (Current movement speed of (Load 0 of (Key (Triggering unit)) in FR_Hashtable)) as 2 of (Key (Triggering unit)) in FR_Hashtable
      • Set FR_Caster = (Load 0 of (Key (Triggering unit)) in FR_Hashtable)
      • Unit Group - Add FR_Caster to FR_UnitGroup
      • Unit - Set FR_Caster movement speed to 150.00
      • -------- ------------------------------------- --------
      • -------- Spell Constants --------
      • -------- ------------------------------------- --------
      • Hashtable - Save False as 3 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save 300.00 as 4 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save (Level of Freezing Ray for (Load 0 of (Key (Triggering unit)) in FR_Hashtable)) as 5 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save (((Max mana of (Load 0 of (Key (Triggering unit)) in FR_Hashtable)) / 100.00) x (0.20 x (Real((Load 5 of (Key (Triggering unit)) from FR_Hashtable))))) as 5 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save (1.50 + (0.50 x (Real((Load 5 of (Key (Triggering unit)) from FR_Hashtable))))) as 7 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save 0.00 as 8 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save ((400.00 + (Real((Load 5 of (Key (Triggering unit)) from FR_Hashtable)))) x 100.00) as 9 of (Key (Triggering unit)) in FR_Hashtable
      • Hashtable - Save 0.00 as 10 of (Key (Triggering unit)) in FR_Hashtable
      • -------- ------------------------------------- --------
      • -------- Begin creation of the line --------
      • -------- ------------------------------------- --------
      • Set FR_TempPoint = (Position of FR_Caster)
      • Set FR_CurrentRange = (Load 4 of (Key (Triggering unit)) from FR_Hashtable)
      • Set FR_Player = (Load 1 of (Key (Triggering unit)) in FR_Hashtable)
      • For each (Integer FR_Unitloop) from 1 to ((Integer(FR_CurrentRange)) / 25), do (Actions)
        • Loop - Actions
          • Set FR_TempPoint2 = (FR_TempPoint offset by (25.00 x (Real(FR_Unitloop))) towards (Facing of FR_Caster) degrees)
          • Unit - Create 1 FR_Dummy for FR_Player at FR_TempPoint2 facing Default building facing degrees
          • Unit Group - Add (Last created unit) to FR_DummyGroup
          • Custom script: call RemoveLocation(udg_FR_TempPoint2)
      • -------- ------------------------------------- --------
      • -------- Add/Remove Abilities --------
      • -------- ------------------------------------- --------
      • Player - Disable Freezing Ray for FR_Player
      • Unit - Add Cancel Freezing Ray to FR_Caster
      • Unit - Add Increase Range to FR_Caster
      • -------- ------------------------------------- --------
      • -------- Remove Location --------
      • -------- ------------------------------------- --------
      • Custom script: call RemoveLocation(udg_FR_TempPoint)


  • Freezing Ray CancelIncrease
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FR_UnitGroup and do (Actions)
        • Loop - Actions
          • Set FR_Caster = (Picked unit)
          • Set FR_Player = (Load 1 of (Key (Picked unit)) in FR_Hashtable)
          • Set FR_CurrentRange = (Load 4 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_MaxRange = (Load 9 of (Key (Picked unit)) from FR_Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to Cancel Freezing Ray
              • (Triggering unit) Equal to FR_Caster
            • Then - Actions
              • Set FR_Canceled = True
              • Hashtable - Save FR_Canceled as 3 of (Key (Picked unit)) in FR_Hashtable
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to Increase Range
                  • (Triggering unit) Equal to FR_Caster
                  • FR_CurrentRange Less than FR_MaxRange
                • Then - Actions
                  • Set FR_CurrentRange = (FR_CurrentRange + 50.00)
                  • Hashtable - Save FR_CurrentRange as 9 of (Key (Picked unit)) in FR_Hashtable
                  • Set FR_TempPoint = (Position of FR_Caster)
                  • Set FR_TempPoint2 = (FR_TempPoint offset by FR_CurrentRange towards (Facing of FR_Caster) degrees)
                  • Unit - Create 1 FR_Dummy for FR_Player at FR_TempPoint2 facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to FR_DummyGroup
                  • Custom script: call RemoveLocation(udg_FR_TempPoint)
                  • Custom script: call RemoveLocation(udg_FR_TempPoint2)
                • Else - Actions


  • Freezing Ray Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FR_UnitGroup and do (Actions)
        • Loop - Actions
          • Set FR_Caster = (Picked unit)
          • Set FR_Player = (Load 1 of (Key (Picked unit)) in FR_Hashtable)
          • Set FR_MovementSpeed = (Load 2 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_Canceled = (Load 3 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_CurrentRange = (Load 4 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_Damage = (Load 6 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_ManaDrain = (Load 7 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_ManaDrainTime = (Load 8 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_MaxRange = (Load 9 of (Key (Picked unit)) from FR_Hashtable)
          • Set FR_TempReal = (Load 10 of (Key (Picked unit)) from FR_Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (FR_Caster is dead) Equal to False
              • (Percentage mana of FR_Caster) Greater than 5.00
              • FR_Canceled Not equal to True
              • (FR_Caster has buff Sleep (Pause)) Equal to False
              • (FR_Caster has buff Sleep (Stun)) Equal to False
              • (FR_Caster has buff Stunned (Pause)) Equal to False
            • Then - Actions
              • Set FR_ManaDrainTime = (FR_ManaDrainTime + 0.03)
              • Hashtable - Save FR_ManaDrainTime as 8 of (Key (Picked unit)) in FR_Hashtable
              • Unit Group - Pick every unit in FR_DummyGroup and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Owner of (Picked unit)) Equal to FR_Player
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FR_TempReal Less than FR_CurrentRange
                        • Then - Actions
                          • Set FR_TempReal = (FR_TempReal + 50.00)
                          • Set FR_TempPoint = (Position of FR_Caster)
                          • Set FR_TempPoint2 = (FR_TempPoint offset by FR_TempReal towards (Facing of FR_Caster) degrees)
                          • Unit - Move (Picked unit) instantly to FR_TempPoint2
                          • Custom script: call RemoveLocation(udg_FR_TempPoint)
                          • Custom script: call RemoveLocation(udg_FR_TempPoint2)
                        • Else - Actions
                          • Set FR_TempReal = 0.00
                    • Else - Actions
              • Hashtable - Save FR_TempReal as 10 of (Key (Picked unit)) in FR_Hashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FR_ManaDrainTime Equal to 0.99
                • Then - Actions
                  • Set FR_ManaDrainTime = 0.00
                  • Hashtable - Save FR_ManaDrainTime as 8 of (Key (Picked unit)) in FR_Hashtable
                  • Set FR_TempMana = (((Max mana of FR_Caster) / 100.00) x FR_ManaDrain)
                  • Unit - Set mana of FR_Caster to ((Mana of FR_Caster) - FR_TempMana)
                  • Unit Group - Pick every unit in FR_DummyGroup and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Owner of (Picked unit)) Equal to FR_Player
                        • Then - Actions
                          • Set FR_TempPoint = (Position of (Picked unit))
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Pick every unit in (Units within 150.00 of FR_TempPoint matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy of FR_Player) Equal to True)))) and do (Actions)
                            • Loop - Actions
                              • Set FR_TempPoint2 = (Position of (Picked unit))
                              • Special Effect - Create a special effect at FR_TempPoint2 using war3mapImported\cold-swirl-final.MDX
                              • Special Effect - Destroy (Last created special effect)
                              • Unit - Cause FR_Caster to damage (Picked unit), dealing FR_Damage damage of attack type Spells and damage type Unknown
                              • Custom script: call RemoveLocation(udg_FR_TempPoint2)
                          • Custom script: call RemoveLocation(udg_FR_TempPoint)
                        • Else - Actions
                • Else - Actions
            • Else - Actions
              • -------- ------------------------------------- --------
              • -------- Remove Leaks --------
              • -------- ------------------------------------- --------
              • Unit Group - Pick every unit in FR_DummyGroup and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Owner of (Picked unit)) Equal to FR_Player
                    • Then - Actions
                      • Unit - Remove (Picked unit) from the game
                    • Else - Actions
              • -------- ------------------------------------- --------
              • -------- Spell Constants --------
              • -------- ------------------------------------- --------
              • Unit - Set FR_Caster movement speed to FR_MovementSpeed
              • Unit - Remove Cancel Freezing Ray from FR_Caster
              • Unit - Remove Increase Range from FR_Caster
              • Player - Enable Freezing Ray for FR_Player
              • Unit Group - Remove FR_Caster from FR_UnitGroup
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in FR_Hashtable
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (FR_UnitGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


Keywords:
hashtables, gui, line, spell, damage, mana drain, mana, drain,
Contents

Freezing Ray v1.1 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Reviewed by Maker, Freezing Ray 1.1, 3rd Jan Delete Hashtable - Save Handle Of(Triggering unit) as 0 of (Key (Triggering unit)) in FR_Hashtable You're using Load 0 of...but you...

Moderator

M

Moderator

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

Reviewed by Maker, Freezing Ray 1.1, 3rd Jan

  • Delete
    • Hashtable - Save Handle Of(Triggering unit) as 0 of (Key (Triggering unit)) in FR_Hashtable
  • You're using Load 0 of...but you should use triggering unit
  • Remove uogrades used from the dumy, give it no sight range
  • The spell is not MUI due to the fact that you disable the ability. Use a toggleable ability. Also not MUI due to your dummy removal thing in the looping trigger
  • Freezing Ray CancelIncrease activates for every ability
  • You don't need to pick all units in a group in Freezing Ray CancelIncrease
  • At the beginning of the looping trigger you load stuff that you might not need
 
Top