1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  4. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Glacial Dragon v1.4 [GUI]

Submitted by Kazeon
This bundle is marked as approved. It works and satisfies the submission rules.
[​IMG]


[​IMG] [​IMG] [​IMG] [​IMG]





Spell Codes:
  • GlacialDragon
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ------------------------------------------------- --------
      • -------- Spell Configuration --------
      • -------- ------------------------------------------------- --------
      • -------- Glacial Dragon ability ID --------
      • Set GlaciarDragon__Conf__MainSpell = Glacial Dragon (Main)
      • -------- Glacial Dragon (Cancel) ability ID --------
      • Set GlaciarDragon__Conf__Cancel = Glacial Dragon (Cancel)
      • -------- Dummy unit ID --------
      • Set GlaciarDragon__Conf__DummyID = Dummy
      • -------- Order ID used to control the dragon. Currently using "smart" or known as right click command. --------
      • Set GlaciarDragon__Conf__OrderID = 851971
      • -------- Glacial Dragon (Cancel) ability order ID (stomp) --------
      • Set GlaciarDragon__Conf__CancelID = 852127
      • -------- Played animation when casting the spell --------
      • Set GlaciarDragon__Conf__Animation = channel
      • -------- Dragon head model --------
      • Set GlaciarDragon__Conf__HeadSfx = war3mapImported\FireworksDragonHeadBlue.mdx
      • -------- Dragon tail model --------
      • Set GlaciarDragon__Conf__TailSfx = war3mapImported\WaterOfReplenishment.mdx
      • -------- Special effect when the dragon went underground --------
      • Set GlaciarDragon__Conf__SplashSfx = war3mapImported\WaterBlast.mdx
      • -------- Special effect when a unit got struck by the dragon --------
      • Set GlaciarDragon__Conf__HitSfx = war3mapImported\OrbOfSeas.mdx
      • Set GlaciarDragon__Conf__HitSfxPt = chest
      • -------- Decay time duration for special effects --------
      • Set GlaciarDragon__Conf__SfxDur = 5.00
      • -------- If true, the dragon also deals damage when aiming --------
      • Set GlaciarDragon__Conf__AimDamage = False
      • -------- If true, the dragon will have spherical collision --------
      • Set GlaciarDragon__Conf__SphereCol = True
      • -------- Initial order offset for dragon when the spell is casted --------
      • Set GlaciarDragon__Conf__Offset = 800.00
      • -------- Dragon's collision size (spell AoE) --------
      • Set GlaciarDragon__Conf__Collision = 200.00
      • -------- Dragon's movespeed when aiming --------
      • Set GlaciarDragon__Conf__AimSpd = 15.00
      • -------- Dragon's flying speed when aiming --------
      • -------- --- Higher number will reduce dragon's time to aim --------
      • Set GlaciarDragon__Conf__AimZRate = 10.00
      • -------- Dragon's turning rate when aiming --------
      • -------- --- The higher the more accurate the dragon will be --------
      • Set GlaciarDragon__Conf__AimTrn = 5.00
      • -------- Dragon's maximum movespeed when striking --------
      • Set GlaciarDragon__Conf__StrikeSpd = 60.00
      • -------- Dragon's flying speed when striking --------
      • -------- --- Higher number will make dragon's travel distance shorter --------
      • Set GlaciarDragon__Conf__SZRate = 1.00
      • -------- Dragon's turning rate when striking --------
      • -------- --- The higher the more accurate the dragon will be --------
      • Set GlaciarDragon__Conf__StrikeTrn = 1.00
      • -------- Dragon's maximum fly height before starting to strike --------
      • -------- --- Higher number will give the dragon more times to aim --------
      • -------- --- and the longer the distance it will travel --------
      • Set GlaciarDragon__Conf__StrikeZ = 200.00
      • -------- Dragon's maximum flying speed when striking --------
      • Set GlaciarDragon__Conf__ZRateMax = 45.00
      • -------- Dragon's turning rate when underground --------
      • -------- --- The higher the more accurate the dragon will be --------
      • Set GlaciarDragon__Conf__UdTurn = 2.00
      • -------- Delay between each strike --------
      • Set GlaciarDragon__Conf__Delay = 2.00
      • -------- Acceleration rate when striking --------
      • Set GlaciarDragon__Conf__Acce = 2.00
      • -------- Deacceleration rate when underground --------
      • -------- --- Higher number will make the dragon appears closer when re-appearing --------
      • Set GlaciarDragon__Conf__Deacc = 0.05
      • -------- Lifespan of the dragon --------
      • -------- --- Use zero to make it lasts forever --------
      • Set GlaciarDragon__Conf__Duration[1] = 0.00
      • Set GlaciarDragon__Conf__Duration[2] = 0.00
      • Set GlaciarDragon__Conf__Duration[3] = 0.00
      • -------- Dealt damage amount --------
      • Set GlaciarDragon__Conf__Damage[1] = 80.00
      • Set GlaciarDragon__Conf__Damage[2] = 150.00
      • Set GlaciarDragon__Conf__Damage[3] = 220.00
      • -------- Dealt damage type --------
      • Set GlaciarDragon__Conf__AtkType = Spells
      • Set GlaciarDragon__Conf__DmgType = Cold
      • -------- Amount of mana consumed per 1 second --------
      • Set GlaciarDragon__Conf__Manacost[1] = 5.00
      • Set GlaciarDragon__Conf__Manacost[2] = 10.00
      • Set GlaciarDragon__Conf__Manacost[3] = 15.00
      • -------- Maximum number of strikes per cast --------
      • -------- --- Use zero to make it unlimited --------
      • Set GlaciarDragon__Conf__Strikes[1] = 3
      • Set GlaciarDragon__Conf__Strikes[2] = 5
      • Set GlaciarDragon__Conf__Strikes[3] = 0
      • -------- Timer's interval --------
      • -------- --- Recommended not to modify this --------
      • Set GlaciarDragon__Conf__Interval = 0.03
      • -------- !!!! Don't touch this part!!!! --------
      • Set GlaciarDragon__Conf__ZRateMax = (GlaciarDragon__Conf__ZRateMax x -1.00)
      • Custom script: call ExecuteFunc("GlaciarDragon__Setting")
      • Custom script: call ExecuteFunc("GlaciarDragon__Init")
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__TargetFilter takes nothing returns nothing
      • -------- ------------------------------------------------- --------
      • -------- Spell target classifications --------
      • -------- ------------------------------------------------- --------
      • -------- Use "GlaciarDragon__FilterTarget" to refer to the damaged unit --------
      • -------- Use "GlaciarDragon__FilterCaster" to refer to the owner of spell caster --------
      • -------- You may only modify the "Condition" block --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (GlaciarDragon__FilterTarget is A structure) Equal to (==) False
            • (GlaciarDragon__FilterTarget is Magic Immune) Equal to (==) False
            • (GlaciarDragon__FilterTarget belongs to an enemy of GlaciarDragon__FilterCaster) Equal to (==) True
          • Then - Actions
            • Set GlaciarDragon__Classified = True
          • Else - Actions
            • Set GlaciarDragon__Classified = False
      • -------- !!!! Don't touch this part!!!! --------
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__StopCondition takes nothing returns nothing
      • -------- ------------------------------------------------- --------
      • -------- Stop channeling conditions --------
      • -------- ------------------------------------------------- --------
      • -------- Use "GlaciarDragon__WhichUnit" to refer to the caster --------
      • -------- Stop channeling if the caster is stunned --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Multiple ConditionsOr - Any (Conditions) are true
              • Conditions
                • (GlaciarDragon__WhichUnit has buff Stunned) Equal to (==) True
                • (GlaciarDragon__WhichUnit has buff Stunned (Pause)) Equal to (==) True
          • Then - Actions
            • Set GlaciarDragon__Classified = True
          • Else - Actions
            • Set GlaciarDragon__Classified = False
      • -------- ------------------------------------------------- --------
      • -------- Spell Codes --------
      • -------- ------------------------------------------------- --------
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__Dispose takes nothing returns nothing
      • -------- Dispose the instance --------
      • Custom script: if (udg_GlaciarDragon__Head[udg_GlaciarDragon__TempInt] != null) then
      • Special Effect - Destroy GlaciarDragon__Head[GlaciarDragon__TempInt]
      • Special Effect - Destroy GlaciarDragon__Tail[GlaciarDragon__TempInt]
      • Custom script: endif
      • Unit - Add a GlaciarDragon__Conf__SfxDur second Generic expiration timer to GlaciarDragon__Dummy[GlaciarDragon__TempInt]
      • Unit - Remove Cargo Hold (Orc Burrow) from GlaciarDragon__Caster[GlaciarDragon__TempInt]
      • Unit - Remove GlaciarDragon__Conf__Cancel from GlaciarDragon__Caster[GlaciarDragon__TempInt]
      • Unit - Set level of GlaciarDragon__Conf__MainSpell for GlaciarDragon__Caster[GlaciarDragon__TempInt] to GlaciarDragon__Level[GlaciarDragon__TempInt]
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (GlaciarDragon__Caster[GlaciarDragon__TempInt] is dead) Equal to (==) False
          • Then - Actions
            • Animation - Play GlaciarDragon__Caster[GlaciarDragon__TempInt]'s stand animation
          • Else - Actions
      • -------- De-index the variables --------
      • Custom script: call DestroyGroup(udg_GlaciarDragon__Targets[udg_GlaciarDragon__TempInt])
      • Set GlaciarDragon__CasterIndex[(Custom value of GlaciarDragon__Caster[GlaciarDragon__TempInt])] = 0
      • Set GlaciarDragon__Caster[GlaciarDragon__TempInt] = GlaciarDragon__Caster[GlaciarDragon__Count]
      • Set GlaciarDragon__Owner[GlaciarDragon__TempInt] = GlaciarDragon__Owner[GlaciarDragon__Count]
      • Set GlaciarDragon__Dummy[GlaciarDragon__TempInt] = GlaciarDragon__Dummy[GlaciarDragon__Count]
      • Set GlaciarDragon__Head[GlaciarDragon__TempInt] = GlaciarDragon__Head[GlaciarDragon__Count]
      • Set GlaciarDragon__Tail[GlaciarDragon__TempInt] = GlaciarDragon__Tail[GlaciarDragon__Count]
      • Set GlaciarDragon__Delay[GlaciarDragon__TempInt] = GlaciarDragon__Delay[GlaciarDragon__Count]
      • Set GlaciarDragon__Striking[GlaciarDragon__TempInt] = GlaciarDragon__Striking[GlaciarDragon__Count]
      • Set GlaciarDragon__Underground[GlaciarDragon__TempInt] = GlaciarDragon__Underground[GlaciarDragon__Count]
      • Set GlaciarDragon__Speed[GlaciarDragon__TempInt] = GlaciarDragon__Speed[GlaciarDragon__Count]
      • Set GlaciarDragon__Angle[GlaciarDragon__TempInt] = GlaciarDragon__Angle[GlaciarDragon__Count]
      • Set GlaciarDragon__LocX[GlaciarDragon__TempInt] = GlaciarDragon__LocX[GlaciarDragon__Count]
      • Set GlaciarDragon__LocY[GlaciarDragon__TempInt] = GlaciarDragon__LocY[GlaciarDragon__Count]
      • Set GlaciarDragon__LocZ[GlaciarDragon__TempInt] = GlaciarDragon__LocZ[GlaciarDragon__Count]
      • Set GlaciarDragon__SLocZ[GlaciarDragon__TempInt] = GlaciarDragon__SLocZ[GlaciarDragon__Count]
      • Set GlaciarDragon__TargetX[GlaciarDragon__TempInt] = GlaciarDragon__TargetX[GlaciarDragon__Count]
      • Set GlaciarDragon__TargetY[GlaciarDragon__TempInt] = GlaciarDragon__TargetY[GlaciarDragon__Count]
      • Set GlaciarDragon__Target[GlaciarDragon__TempInt] = GlaciarDragon__Target[GlaciarDragon__Count]
      • Set GlaciarDragon__Targets[GlaciarDragon__TempInt] = GlaciarDragon__Targets[GlaciarDragon__Count]
      • Set GlaciarDragon__ZVel[GlaciarDragon__TempInt] = GlaciarDragon__ZVel[GlaciarDragon__Count]
      • Set GlaciarDragon__Level[GlaciarDragon__TempInt] = GlaciarDragon__Level[GlaciarDragon__Count]
      • Set GlaciarDragon__Duration[GlaciarDragon__TempInt] = GlaciarDragon__Duration[GlaciarDragon__Count]
      • Set GlaciarDragon__Strikes[GlaciarDragon__TempInt] = GlaciarDragon__Strikes[GlaciarDragon__Count]
      • -------- Remove leaks --------
      • Set GlaciarDragon__Caster[GlaciarDragon__Count] = No unit
      • Set GlaciarDragon__Dummy[GlaciarDragon__Count] = No unit
      • Set GlaciarDragon__Target[GlaciarDragon__Count] = No unit
      • Custom script: set udg_GlaciarDragon__Targets[udg_GlaciarDragon__Count] = null
      • Custom script: set udg_GlaciarDragon__Head[udg_GlaciarDragon__Count] = null
      • Custom script: set udg_GlaciarDragon__Tail[udg_GlaciarDragon__Count] = null
      • Set GlaciarDragon__Count = (GlaciarDragon__Count - 1)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • GlaciarDragon__Count Equal to (==) 0
          • Then - Actions
            • Custom script: call PauseTimer(udg_GlaciarDragon__Timer)
          • Else - Actions
            • Set GlaciarDragon__CasterIndex[(Custom value of GlaciarDragon__Caster[GlaciarDragon__TempInt])] = GlaciarDragon__TempInt
            • Set GlaciarDragon__TempInt = (GlaciarDragon__TempInt - 1)
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__StopChannel takes nothing returns nothing
      • Set GlaciarDragon__TempInt = GlaciarDragon__CasterIndex[(Custom value of GlaciarDragon__WhichUnit)]
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • GlaciarDragon__TempInt Not equal to (!=) 0
          • Then - Actions
            • Custom script: call GlaciarDragon__Dispose()
          • Else - Actions
      • Set GlaciarDragon__WhichUnit = No unit
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__Damage takes nothing returns nothing
      • -------- Apply the damage --------
      • Unit - Cause GlaciarDragon__Caster[GlaciarDragon__TempInt] to damage GlaciarDragon__FilterTarget, dealing GlaciarDragon__Conf__Damage[GlaciarDragon__Level[GlaciarDragon__TempInt]] damage of attack type GlaciarDragon__Conf__AtkType and damage type GlaciarDragon__Conf__DmgType
      • Unit Group - Add GlaciarDragon__FilterTarget to GlaciarDragon__Targets[GlaciarDragon__TempInt]
      • Special Effect - Create a special effect attached to the GlaciarDragon__Conf__HitSfxPt of GlaciarDragon__FilterTarget using GlaciarDragon__Conf__HitSfx
      • Special Effect - Destroy (Last created special effect)
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__InitDamage takes nothing returns nothing
      • Set GlaciarDragon__FilterCaster = GlaciarDragon__Owner[GlaciarDragon__TempInt]
      • Custom script: set bj_wantDestroyGroup = true
      • -------- Apply damage to nearby targets --------
      • Unit Group - Pick every unit in (Units within GlaciarDragon__Conf__Collision of GlaciarDragon__TempLoc) and do (Actions)
        • Loop - Actions
          • Custom script: local real d
          • Custom script: local real h
          • Set GlaciarDragon__FilterTarget = (Picked unit)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (GlaciarDragon__FilterTarget is dead) Equal to (==) False
                • (GlaciarDragon__FilterTarget is in GlaciarDragon__Targets[GlaciarDragon__TempInt]) Equal to (==) False
              • Then - Actions
                • Custom script: call ExecuteFunc("GlaciarDragon__TargetFilter")
                • Custom script: if (udg_GlaciarDragon__Classified) then
                • -------- Calculate distance between objects --------
                • Custom script: set d = udg_GlaciarDragon__LocX[udg_GlaciarDragon__TempInt] - GetUnitX(udg_GlaciarDragon__FilterTarget)
                • Custom script: set h = udg_GlaciarDragon__LocY[udg_GlaciarDragon__TempInt] - GetUnitY(udg_GlaciarDragon__FilterTarget)
                • Custom script: set d = SquareRoot(d*d+h*h)
                • -------- Calculate height z difference --------
                • Custom script: call MoveLocation(udg_GlaciarDragon__CheckLoc, GetUnitX(udg_GlaciarDragon__FilterTarget), GetUnitY(udg_GlaciarDragon__FilterTarget))
                • Custom script: set h = udg_GlaciarDragon__LocZ[udg_GlaciarDragon__TempInt] - (GetUnitFlyHeight(udg_GlaciarDragon__FilterTarget) + GetLocationZ(udg_GlaciarDragon__CheckLoc))
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GlaciarDragon__Conf__SphereCol Equal to (==) True
                    • Then - Actions
                      • -------- If using spherical collision, then use pythagoras formula --------
                      • Custom script: if (d*d+h*h < udg_GlaciarDragon__Conf__Collision*udg_GlaciarDragon__Conf__Collision) then
                      • Custom script: call ExecuteFunc("GlaciarDragon__Damage")
                      • Custom script: endif
                    • Else - Actions
                      • Custom script: if (d < udg_GlaciarDragon__Conf__Collision and RAbsBJ(h) < udg_GlaciarDragon__Conf__Collision) then
                      • Custom script: call ExecuteFunc("GlaciarDragon__Damage")
                      • Custom script: endif
                • Custom script: endif
              • Else - Actions
      • Set GlaciarDragon__FilterTarget = No unit
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__OnPeriodic takes nothing returns nothing
        • Do Multiple ActionsFor each (Integer GlaciarDragon__TempInt) from 1 to GlaciarDragon__Count, do (Actions)
          • Loop - Actions
            • Set GlaciarDragon__WhichUnit = GlaciarDragon__Caster[GlaciarDragon__TempInt]
            • Custom script: call GlaciarDragon__StopCondition()
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GlaciarDragon__Classified Equal to (==) False
                  • (GlaciarDragon__Caster[GlaciarDragon__TempInt] is dead) Equal to (==) False
                    • Multiple ConditionsOr - Any (Conditions) are true
                      • Conditions
                        • GlaciarDragon__Duration[GlaciarDragon__TempInt] Greater than (>) GlaciarDragon__Conf__Interval
                        • GlaciarDragon__Conf__Duration[GlaciarDragon__Level[GlaciarDragon__TempInt]] Less than or equal to (<=) 0.00
                • Then - Actions
                  • Set GlaciarDragon__Duration[GlaciarDragon__TempInt] = (GlaciarDragon__Duration[GlaciarDragon__TempInt] - GlaciarDragon__Conf__Interval)
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Mana of GlaciarDragon__Caster[GlaciarDragon__TempInt]) Greater than or equal to (>=) (GlaciarDragon__Conf__Manacost[GlaciarDragon__Level[GlaciarDragon__TempInt]] x GlaciarDragon__Conf__Interval)
                      • Then - Actions
                        • -------- Apply mana cost --------
                        • Unit - Set mana of GlaciarDragon__Caster[GlaciarDragon__TempInt] to ((Mana of GlaciarDragon__Caster[GlaciarDragon__TempInt]) - (GlaciarDragon__Conf__Manacost[GlaciarDragon__Level[GlaciarDragon__TempInt]] x GlaciarDragon__Conf__Interval))
                          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • GlaciarDragon__Underground[GlaciarDragon__TempInt] Equal to (==) True
                            • Then - Actions
                              • -------- Check delay before next strike --------
                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • GlaciarDragon__Delay[GlaciarDragon__TempInt] Greater than (>) GlaciarDragon__Conf__Interval
                                  • Then - Actions
                                    • Set GlaciarDragon__Delay[GlaciarDragon__TempInt] = (GlaciarDragon__Delay[GlaciarDragon__TempInt] - GlaciarDragon__Conf__Interval)
                                    • Set GlaciarDragon__LocX[GlaciarDragon__TempInt] = (GlaciarDragon__LocX[GlaciarDragon__TempInt] + (GlaciarDragon__Speed[GlaciarDragon__TempInt] x (Cos(GlaciarDragon__Angle[GlaciarDragon__TempInt]))))
                                    • Set GlaciarDragon__LocY[GlaciarDragon__TempInt] = (GlaciarDragon__LocY[GlaciarDragon__TempInt] + (GlaciarDragon__Speed[GlaciarDragon__TempInt] x (Sin(GlaciarDragon__Angle[GlaciarDragon__TempInt]))))
                                    • Set GlaciarDragon__Speed[GlaciarDragon__TempInt] = (GlaciarDragon__Speed[GlaciarDragon__TempInt] - GlaciarDragon__Conf__Deacc)
                                    • Set GlaciarDragon__TempReal = (Atan2((GlaciarDragon__TargetY[GlaciarDragon__TempInt] - GlaciarDragon__LocY[GlaciarDragon__TempInt]), (GlaciarDragon__TargetX[GlaciarDragon__TempInt] - GlaciarDragon__LocX[GlaciarDragon__TempInt])))
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__Speed[GlaciarDragon__TempInt] Less than (<) 0.00
                                        • Then - Actions
                                          • Set GlaciarDragon__Speed[GlaciarDragon__TempInt] = 0.00
                                        • Else - Actions
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__Conf__UdTurn Not equal to (!=) 0.00
                                          • (Cos((GlaciarDragon__Angle[GlaciarDragon__TempInt] - GlaciarDragon__TempReal))) Less than (<) (Cos(GlaciarDragon__Conf__UdTurn))
                                        • Then - Actions
                                          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • (Sin((GlaciarDragon__TempReal - GlaciarDragon__Angle[GlaciarDragon__TempInt]))) Greater than or equal to (>=) 0.00
                                            • Then - Actions
                                              • Set GlaciarDragon__Angle[GlaciarDragon__TempInt] = (GlaciarDragon__Angle[GlaciarDragon__TempInt] + GlaciarDragon__Conf__UdTurn)
                                            • Else - Actions
                                              • Set GlaciarDragon__Angle[GlaciarDragon__TempInt] = (GlaciarDragon__Angle[GlaciarDragon__TempInt] - GlaciarDragon__Conf__UdTurn)
                                        • Else - Actions
                                    • Unit - Make GlaciarDragon__Dummy[GlaciarDragon__TempInt] face GlaciarDragon__Angle[GlaciarDragon__TempInt] over 0.00 seconds
                                  • Else - Actions
                                    • -------- Check world bounds --------
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__LocX[GlaciarDragon__TempInt] Less than (<) GlaciarDragon__BoundMaxX
                                          • GlaciarDragon__LocX[GlaciarDragon__TempInt] Greater than (>) GlaciarDragon__BoundMinX
                                          • GlaciarDragon__LocY[GlaciarDragon__TempInt] Less than (<) GlaciarDragon__BoundMaxY
                                          • GlaciarDragon__LocY[GlaciarDragon__TempInt] Greater than (>) GlaciarDragon__BoundMinY
                                        • Then - Actions
                                          • Custom script: call SetUnitX(udg_GlaciarDragon__Dummy[udg_GlaciarDragon__TempInt], udg_GlaciarDragon__LocX[udg_GlaciarDragon__TempInt])
                                          • Custom script: call SetUnitY(udg_GlaciarDragon__Dummy[udg_GlaciarDragon__TempInt], udg_GlaciarDragon__LocY[udg_GlaciarDragon__TempInt])
                                        • Else - Actions
                                    • Custom script: call MoveLocation(udg_GlaciarDragon__CheckLoc, udg_GlaciarDragon__LocX[udg_GlaciarDragon__TempInt], udg_GlaciarDragon__LocY[udg_GlaciarDragon__TempInt])
                                    • Custom script: set udg_GlaciarDragon__SLocZ[udg_GlaciarDragon__TempInt] = GetLocationZ(udg_GlaciarDragon__CheckLoc)
                                    • Set GlaciarDragon__LocZ[GlaciarDragon__TempInt] = GlaciarDragon__SLocZ[GlaciarDragon__TempInt]
                                    • Set GlaciarDragon__Delay[GlaciarDragon__TempInt] = GlaciarDragon__Conf__Delay
                                    • Set GlaciarDragon__Underground[GlaciarDragon__TempInt] = False
                                    • Set GlaciarDragon__Speed[GlaciarDragon__TempInt] = GlaciarDragon__Conf__AimSpd
                                    • Set GlaciarDragon__ZVel[GlaciarDragon__TempInt] = GlaciarDragon__Conf__AimZRate
                                    • Set GlaciarDragon__TempLoc = (Point(GlaciarDragon__LocX[GlaciarDragon__TempInt], GlaciarDragon__LocY[GlaciarDragon__TempInt]))
                                    • Special Effect - Create a special effect at GlaciarDragon__TempLoc using GlaciarDragon__Conf__SplashSfx
                                    • Special Effect - Destroy (Last created special effect)
                                    • Special Effect - Create a special effect attached to the origin of GlaciarDragon__Dummy[GlaciarDragon__TempInt] using GlaciarDragon__Conf__HeadSfx
                                    • Set GlaciarDragon__Head[GlaciarDragon__TempInt] = (Last created special effect)
                                    • Special Effect - Create a special effect attached to the origin of GlaciarDragon__Dummy[GlaciarDragon__TempInt] using GlaciarDragon__Conf__TailSfx
                                    • Set GlaciarDragon__Tail[GlaciarDragon__TempInt] = (Last created special effect)
                                    • Custom script: call RemoveLocation(udg_GlaciarDragon__TempLoc)
                            • Else - Actions
                              • -------- If the dragon has target, keep targeting it --------
                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • (GlaciarDragon__Target[GlaciarDragon__TempInt] is alive) Equal to (==) True
                                  • Then - Actions
                                    • Custom script: set udg_GlaciarDragon__TargetX[udg_GlaciarDragon__TempInt] = GetUnitX(udg_GlaciarDragon__Target[udg_GlaciarDragon__TempInt])
                                    • Custom script: set udg_GlaciarDragon__TargetY[udg_GlaciarDragon__TempInt] = GetUnitY(udg_GlaciarDragon__Target[udg_GlaciarDragon__TempInt])
                                  • Else - Actions
                              • Set GlaciarDragon__LocX[GlaciarDragon__TempInt] = (GlaciarDragon__LocX[GlaciarDragon__TempInt] + (GlaciarDragon__Speed[GlaciarDragon__TempInt] x (Cos(GlaciarDragon__Angle[GlaciarDragon__TempInt]))))
                              • Set GlaciarDragon__LocY[GlaciarDragon__TempInt] = (GlaciarDragon__LocY[GlaciarDragon__TempInt] + (GlaciarDragon__Speed[GlaciarDragon__TempInt] x (Sin(GlaciarDragon__Angle[GlaciarDragon__TempInt]))))
                              • Set GlaciarDragon__LocZ[GlaciarDragon__TempInt] = (GlaciarDragon__LocZ[GlaciarDragon__TempInt] + GlaciarDragon__ZVel[GlaciarDragon__TempInt])
                              • Set GlaciarDragon__TempLoc = (Point(GlaciarDragon__LocX[GlaciarDragon__TempInt], GlaciarDragon__LocY[GlaciarDragon__TempInt]))
                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • GlaciarDragon__Striking[GlaciarDragon__TempInt] Equal to (==) True
                                  • Then - Actions
                                    • -------- Apply accelerations --------
                                    • Set GlaciarDragon__ZVel[GlaciarDragon__TempInt] = (GlaciarDragon__ZVel[GlaciarDragon__TempInt] - GlaciarDragon__Conf__SZRate)
                                    • Set GlaciarDragon__Speed[GlaciarDragon__TempInt] = (GlaciarDragon__Speed[GlaciarDragon__TempInt] + GlaciarDragon__Conf__Acce)
                                    • -------- Set dragon head's pitch angle --------
                                    • Custom script: call SetUnitAnimationByIndex(udg_GlaciarDragon__Dummy[udg_GlaciarDragon__TempInt], R2I(Atan(udg_GlaciarDragon__ZVel[udg_GlaciarDragon__TempInt]/udg_GlaciarDragon__Speed[udg_GlaciarDragon__TempInt])*bj_RADTODEG)+90)
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__ZVel[GlaciarDragon__TempInt] Less than (<) GlaciarDragon__Conf__ZRateMax
                                        • Then - Actions
                                          • Set GlaciarDragon__ZVel[GlaciarDragon__TempInt] = GlaciarDragon__Conf__ZRateMax
                                        • Else - Actions
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__Speed[GlaciarDragon__TempInt] Greater than (>) GlaciarDragon__Conf__StrikeSpd
                                        • Then - Actions
                                          • Set GlaciarDragon__Speed[GlaciarDragon__TempInt] = GlaciarDragon__Conf__StrikeSpd
                                        • Else - Actions
                                    • -------- Dragon can still turn slowly when striking --------
                                    • Set GlaciarDragon__TempReal = (Atan2((GlaciarDragon__TargetY[GlaciarDragon__TempInt] - GlaciarDragon__LocY[GlaciarDragon__TempInt]), (GlaciarDragon__TargetX[GlaciarDragon__TempInt] - GlaciarDragon__LocX[GlaciarDragon__TempInt])))
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__Conf__StrikeTrn Not equal to (!=) 0.00
                                          • (Cos((GlaciarDragon__Angle[GlaciarDragon__TempInt] - GlaciarDragon__TempReal))) Less than (<) (Cos(GlaciarDragon__Conf__StrikeTrn))
                                        • Then - Actions
                                          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • (Sin((GlaciarDragon__TempReal - GlaciarDragon__Angle[GlaciarDragon__TempInt]))) Greater than or equal to (>=) 0.00
                                            • Then - Actions
                                              • Set GlaciarDragon__Angle[GlaciarDragon__TempInt] = (GlaciarDragon__Angle[GlaciarDragon__TempInt] + GlaciarDragon__Conf__StrikeTrn)
                                            • Else - Actions
                                              • Set GlaciarDragon__Angle[GlaciarDragon__TempInt] = (GlaciarDragon__Angle[GlaciarDragon__TempInt] - GlaciarDragon__Conf__StrikeTrn)
                                        • Else - Actions
                                    • -------- Apply damage to nearby targets --------
                                    • Custom script: call ExecuteFunc("GlaciarDragon__InitDamage")
                                    • Custom script: call MoveLocation(udg_GlaciarDragon__CheckLoc, udg_GlaciarDragon__LocX[udg_GlaciarDragon__TempInt], udg_GlaciarDragon__LocY[udg_GlaciarDragon__TempInt])
                                    • Custom script: set udg_GlaciarDragon__TempReal = GetLocationZ(udg_GlaciarDragon__CheckLoc)
                                    • -------- Check if has reached the ground --------
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__LocZ[GlaciarDragon__TempInt] Less than or equal to (<=) GlaciarDragon__TempReal
                                        • Then - Actions
                                          • Special Effect - Create a special effect at GlaciarDragon__TempLoc using GlaciarDragon__Conf__SplashSfx
                                          • Special Effect - Destroy (Last created special effect)
                                          • -------- If strike count hasn't reach limit --------
                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              • If - Conditions
                                                • Multiple ConditionsOr - Any (Conditions) are true
                                                  • Conditions
                                                    • GlaciarDragon__Strikes[GlaciarDragon__TempInt] Greater than (>) 1
                                                    • GlaciarDragon__Conf__Strikes[GlaciarDragon__Level[GlaciarDragon__TempInt]] Less than or equal to (<=) 0
                                              • Then - Actions
                                                • Set GlaciarDragon__Strikes[GlaciarDragon__TempInt] = (GlaciarDragon__Strikes[GlaciarDragon__TempInt] - 1)
                                                • -------- Reset everything for the next strike --------
                                                • Set GlaciarDragon__Speed[GlaciarDragon__TempInt] = GlaciarDragon__Conf__AimSpd
                                                • Set GlaciarDragon__Underground[GlaciarDragon__TempInt] = True
                                                • Set GlaciarDragon__Striking[GlaciarDragon__TempInt] = False
                                                • Special Effect - Destroy GlaciarDragon__Head[GlaciarDragon__TempInt]
                                                • Special Effect - Destroy GlaciarDragon__Tail[GlaciarDragon__TempInt]
                                                • Unit Group - Remove all units from GlaciarDragon__Targets[GlaciarDragon__TempInt]
                                                • Custom script: set udg_GlaciarDragon__Head[udg_GlaciarDragon__TempInt] = null
                                              • Else - Actions
                                                • Custom script: call GlaciarDragon__Dispose()
                                        • Else - Actions
                                  • Else - Actions
                                    • -------- Set dragon head's pitch angle --------
                                    • Custom script: call SetUnitAnimationByIndex(udg_GlaciarDragon__Dummy[udg_GlaciarDragon__TempInt], R2I(Atan(udg_GlaciarDragon__Conf__AimZRate/udg_GlaciarDragon__Conf__AimSpd)*bj_RADTODEG)+90)
                                    • -------- Keep aiming until strike Z has reached --------
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__LocZ[GlaciarDragon__TempInt] Less than or equal to (<=) (GlaciarDragon__Conf__StrikeZ + GlaciarDragon__SLocZ[GlaciarDragon__TempInt])
                                        • Then - Actions
                                          • Set GlaciarDragon__TempReal = (Atan2((GlaciarDragon__TargetY[GlaciarDragon__TempInt] - GlaciarDragon__LocY[GlaciarDragon__TempInt]), (GlaciarDragon__TargetX[GlaciarDragon__TempInt] - GlaciarDragon__LocX[GlaciarDragon__TempInt])))
                                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                              • If - Conditions
                                                • (Sin((GlaciarDragon__TempReal - GlaciarDragon__Angle[GlaciarDragon__TempInt]))) Greater than or equal to (>=) 0.00
                                              • Then - Actions
                                                • Set GlaciarDragon__Angle[GlaciarDragon__TempInt] = (GlaciarDragon__Angle[GlaciarDragon__TempInt] + GlaciarDragon__Conf__AimTrn)
                                              • Else - Actions
                                                • Set GlaciarDragon__Angle[GlaciarDragon__TempInt] = (GlaciarDragon__Angle[GlaciarDragon__TempInt] - GlaciarDragon__Conf__AimTrn)
                                        • Else - Actions
                                          • Set GlaciarDragon__Striking[GlaciarDragon__TempInt] = True
                                    • -------- If want to apply damage when aiming --------
                                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • GlaciarDragon__Conf__AimDamage Equal to (==) True
                                        • Then - Actions
                                          • Custom script: call ExecuteFunc("GlaciarDragon__InitDamage")
                                        • Else - Actions
                              • -------- Check world bounds --------
                                • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • GlaciarDragon__LocX[GlaciarDragon__TempInt] Less than (<) GlaciarDragon__BoundMaxX
                                    • GlaciarDragon__LocX[GlaciarDragon__TempInt] Greater than (>) GlaciarDragon__BoundMinX
                                    • GlaciarDragon__LocY[GlaciarDragon__TempInt] Less than (<) GlaciarDragon__BoundMaxY
                                    • GlaciarDragon__LocY[GlaciarDragon__TempInt] Greater than (>) GlaciarDragon__BoundMinY
                                  • Then - Actions
                                    • Custom script: call SetUnitX(udg_GlaciarDragon__Dummy[udg_GlaciarDragon__TempInt], udg_GlaciarDragon__LocX[udg_GlaciarDragon__TempInt])
                                    • Custom script: call SetUnitY(udg_GlaciarDragon__Dummy[udg_GlaciarDragon__TempInt], udg_GlaciarDragon__LocY[udg_GlaciarDragon__TempInt])
                                  • Else - Actions
                              • Unit - Make GlaciarDragon__Dummy[GlaciarDragon__TempInt] face GlaciarDragon__Angle[GlaciarDragon__TempInt] over 0.00 seconds
                              • Custom script: call MoveLocation(udg_GlaciarDragon__CheckLoc, udg_GlaciarDragon__LocX[udg_GlaciarDragon__TempInt], udg_GlaciarDragon__LocY[udg_GlaciarDragon__TempInt])
                              • Custom script: set udg_GlaciarDragon__TempReal = GetLocationZ(udg_GlaciarDragon__CheckLoc)
                              • Animation - Change GlaciarDragon__Dummy[GlaciarDragon__TempInt] flying height to (GlaciarDragon__LocZ[GlaciarDragon__TempInt] - GlaciarDragon__TempReal) at 0.00
                              • Custom script: call RemoveLocation(udg_GlaciarDragon__TempLoc)
                      • Else - Actions
                        • Custom script: call GlaciarDragon__Dispose()
                • Else - Actions
                  • Custom script: call GlaciarDragon__Dispose()
            • Set GlaciarDragon__WhichUnit = No unit
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__Queue takes nothing returns nothing
      • Set GlaciarDragon__Queue__Index = (GlaciarDragon__Queue__Index + 1)
      • Set GlaciarDragon__Count = (GlaciarDragon__Count + 1)
      • -------- Initialize variables --------
      • Set GlaciarDragon__Caster[GlaciarDragon__Count] = GlaciarDragon__Queue__Unit[GlaciarDragon__Queue__Index]
      • Set GlaciarDragon__CasterIndex[(Custom value of GlaciarDragon__Caster[GlaciarDragon__Count])] = GlaciarDragon__Count
      • Set GlaciarDragon__Owner[GlaciarDragon__Count] = (Owner of GlaciarDragon__Caster[GlaciarDragon__Count])
      • Set GlaciarDragon__Delay[GlaciarDragon__Count] = 0.00
      • Set GlaciarDragon__Striking[GlaciarDragon__Count] = False
      • Set GlaciarDragon__Underground[GlaciarDragon__Count] = True
      • Set GlaciarDragon__Speed[GlaciarDragon__Count] = GlaciarDragon__Conf__AimSpd
      • Set GlaciarDragon__Angle[GlaciarDragon__Count] = (Facing of GlaciarDragon__Caster[GlaciarDragon__Count])
      • Custom script: set udg_GlaciarDragon__Targets[udg_GlaciarDragon__Count] = CreateGroup()
      • Custom script: set udg_GlaciarDragon__LocX[udg_GlaciarDragon__Count] = GetUnitX(udg_GlaciarDragon__Caster[udg_GlaciarDragon__Count])
      • Custom script: set udg_GlaciarDragon__LocY[udg_GlaciarDragon__Count] = GetUnitY(udg_GlaciarDragon__Caster[udg_GlaciarDragon__Count])
      • Set GlaciarDragon__LocZ[GlaciarDragon__Count] = 0.00
      • Set GlaciarDragon__TargetX[GlaciarDragon__Count] = (GlaciarDragon__LocX[GlaciarDragon__Count] + (GlaciarDragon__Conf__Offset x (Cos(GlaciarDragon__Angle[GlaciarDragon__Count]))))
      • Set GlaciarDragon__TargetY[GlaciarDragon__Count] = (GlaciarDragon__LocY[GlaciarDragon__Count] + (GlaciarDragon__Conf__Offset x (Sin(GlaciarDragon__Angle[GlaciarDragon__Count]))))
      • Set GlaciarDragon__Level[GlaciarDragon__Count] = (Level of GlaciarDragon__Conf__MainSpell for GlaciarDragon__Caster[GlaciarDragon__Count])
      • Set GlaciarDragon__Duration[GlaciarDragon__Count] = GlaciarDragon__Conf__Duration[GlaciarDragon__Level[GlaciarDragon__Count]]
      • Set GlaciarDragon__Strikes[GlaciarDragon__Count] = GlaciarDragon__Conf__Strikes[GlaciarDragon__Level[GlaciarDragon__Count]]
      • Set GlaciarDragon__TempLoc = (Point(GlaciarDragon__LocX[GlaciarDragon__Count], GlaciarDragon__LocY[GlaciarDragon__Count]))
      • -------- Initialize dummy unit --------
      • Unit - Create 1 GlaciarDragon__Conf__DummyID for GlaciarDragon__Owner[GlaciarDragon__Count] at GlaciarDragon__TempLoc facing GlaciarDragon__Angle[GlaciarDragon__Count] degrees
      • Set GlaciarDragon__Dummy[GlaciarDragon__Count] = (Last created unit)
      • Unit - Add Crow Form to GlaciarDragon__Dummy[GlaciarDragon__Count]
      • Unit - Remove Crow Form from GlaciarDragon__Dummy[GlaciarDragon__Count]
      • -------- Prepare the caster to channel --------
      • Unit - Add Cargo Hold (Orc Burrow) to GlaciarDragon__Caster[GlaciarDragon__Count]
      • Unit - Add GlaciarDragon__Conf__Cancel to GlaciarDragon__Caster[GlaciarDragon__Count]
      • Unit - Set level of GlaciarDragon__Conf__MainSpell for GlaciarDragon__Caster[GlaciarDragon__Count] to 999
      • Unit - Increase level of GlaciarDragon__Conf__MainSpell for GlaciarDragon__Caster[GlaciarDragon__Count]
      • Unit - Order GlaciarDragon__Caster[GlaciarDragon__Count] to Stop
      • Animation - Play GlaciarDragon__Caster[GlaciarDragon__Count]'s GlaciarDragon__Conf__Animation animation
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • GlaciarDragon__Count Equal to (==) 1
          • Then - Actions
            • Custom script: call TimerStart(udg_GlaciarDragon__Timer, udg_GlaciarDragon__Conf__Interval, true, function GlaciarDragon__OnPeriodic)
          • Else - Actions
      • Set GlaciarDragon__Queue__Unit[GlaciarDragon__Queue__Index] = No unit
      • -------- If has reached the end of queue then reset the queue --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • GlaciarDragon__Queue__Index Equal to (==) GlaciarDragon__Queue__Count
          • Then - Actions
            • Set GlaciarDragon__Queue__Index = 0
            • Set GlaciarDragon__Queue__Count = 0
            • Custom script: call PauseTimer(udg_GlaciarDragon__Queue__Timer)
          • Else - Actions
      • Custom script: call RemoveLocation(udg_GlaciarDragon__TempLoc)
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__onCast takes nothing returns boolean
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Ability being cast) Equal to (==) GlaciarDragon__Conf__MainSpell
          • Then - Actions
            • -------- Add caster to the queue --------
            • Set GlaciarDragon__Queue__Count = (GlaciarDragon__Queue__Count + 1)
            • Set GlaciarDragon__Queue__Unit[GlaciarDragon__Queue__Count] = (Triggering unit)
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GlaciarDragon__Queue__Count Equal to (==) 1
                • Then - Actions
                  • Custom script: call TimerStart(udg_GlaciarDragon__Queue__Timer, 0, true, function GlaciarDragon__Queue)
                • Else - Actions
          • Else - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Ability being cast) Equal to (==) GlaciarDragon__Conf__Cancel
              • Then - Actions
                • -------- Stop channeling --------
                • Set GlaciarDragon__TempInt = GlaciarDragon__CasterIndex[(Custom value of (Triggering unit))]
                • Custom script: call GlaciarDragon__Dispose()
              • Else - Actions
      • Custom script: return false
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__onOrder takes nothing returns boolean
      • Custom script: local widget w
      • Set GlaciarDragon__TempInt2 = GlaciarDragon__CasterIndex[(Custom value of (Triggering unit))]
      • -------- If ordered unit is one of the caster --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • GlaciarDragon__TempInt2 Greater than (>) 0
          • Then - Actions
            • Custom script: if (GetIssuedOrderId() == udg_GlaciarDragon__Conf__OrderID) then
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Target unit of issued order) Equal to (==) No unit
                • Then - Actions
                  • Set GlaciarDragon__Target[GlaciarDragon__TempInt2] = No unit
                  • Custom script: set w = GetOrderTarget()
                  • Custom script: if (w == null) then
                  • Custom script: set udg_GlaciarDragon__TargetX[udg_GlaciarDragon__TempInt2] = GetOrderPointX()
                  • Custom script: set udg_GlaciarDragon__TargetY[udg_GlaciarDragon__TempInt2] = GetOrderPointY()
                  • Custom script: else
                  • Custom script: set udg_GlaciarDragon__TargetX[udg_GlaciarDragon__TempInt2] = GetWidgetX(w)
                  • Custom script: set udg_GlaciarDragon__TargetY[udg_GlaciarDragon__TempInt2] = GetWidgetY(w)
                  • Custom script: set w = null
                  • Custom script: endif
                • Else - Actions
                  • Set GlaciarDragon__Target[GlaciarDragon__TempInt2] = (Target unit of issued order)
            • Custom script: endif
            • -------- If order is not the cancel order --------
            • Custom script: if (GetIssuedOrderId() != udg_GlaciarDragon__Conf__CancelID) then
            • Trigger - Turn off GlaciarDragon__OrderTrigger
            • Set GlaciarDragon__TempLoc = (Position of GlaciarDragon__Caster[GlaciarDragon__TempInt2])
            • Set GlaciarDragon__TempLoc2 = (GlaciarDragon__TempLoc offset by 0.50 towards (Facing of GlaciarDragon__Caster[GlaciarDragon__TempInt2]) degrees)
            • Unit - Order GlaciarDragon__Caster[GlaciarDragon__TempInt2] to Move To GlaciarDragon__TempLoc2
            • Animation - Play GlaciarDragon__Caster[GlaciarDragon__TempInt2]'s GlaciarDragon__Conf__Animation animation
            • Custom script: call RemoveLocation(udg_GlaciarDragon__TempLoc)
            • Custom script: call RemoveLocation(udg_GlaciarDragon__TempLoc2)
            • Trigger - Turn on GlaciarDragon__OrderTrigger
            • Custom script: endif
          • Else - Actions
      • Custom script: return false
      • Custom script: endfunction
      • Custom script:
      • Custom script: function GlaciarDragon__Init takes nothing returns nothing
      • Custom script: local rect r = GetWorldBounds()
      • -------- Generate variables --------
      • Set GlaciarDragon__Timer = GlaciarDragon__Timer
      • Set GlaciarDragon__Queue__Timer = GlaciarDragon__Queue__Timer
      • -------- ----- --------
      • Set GlaciarDragon__CheckLoc = (Point(0.00, 0.00))
      • Custom script: set udg_GlaciarDragon__BoundMaxX = GetRectMaxX(r)
      • Custom script: set udg_GlaciarDragon__BoundMaxY = GetRectMaxY(r)
      • Custom script: set udg_GlaciarDragon__BoundMinX = GetRectMinX(r)
      • Custom script: set udg_GlaciarDragon__BoundMinY = GetRectMinY(r)
      • -------- Normal WE does not instantiate a trigger variable automatically --------
      • Custom script: if (udg_GlaciarDragon__OrderTrigger == null) then
      • Custom script: set udg_GlaciarDragon__OrderTrigger = CreateTrigger()
      • Custom script: endif
      • Trigger - Add to GlaciarDragon__OrderTrigger the event (Unit - A unit Starts the effect of an ability)
      • Custom script: call TriggerAddCondition(udg_GlaciarDragon__OrderTrigger, Condition(function GlaciarDragon__onCast))
      • Custom script: set udg_GlaciarDragon__OrderTrigger = CreateTrigger()
      • Trigger - Add to GlaciarDragon__OrderTrigger the event (Unit - A unit Is issued an order targeting an object)
      • Trigger - Add to GlaciarDragon__OrderTrigger the event (Unit - A unit Is issued an order targeting a point)
      • Trigger - Add to GlaciarDragon__OrderTrigger the event (Unit - A unit Is issued an order with no target)
      • Custom script: call TriggerAddCondition(udg_GlaciarDragon__OrderTrigger, Condition(function GlaciarDragon__onOrder))
      • Custom script: set r = null


Credits:
- Bribe: GUI UnitIndexer
- Chrome67: BTNDragonFire (recolored)
- Jhonny Janbo: FireworkDragonHead.mdx (edited)
- Lichkings slave: WaterOfReplenishment.mdx (edited)
- JesusHipster: WaterBlast.mdx


Latest update (v1.4):
- Added stop channeling condition feature (known bug)
- Added stop channeling function
- Removed some reference leaks

Previous (v1.3):
- New and improved configuration features
- Bunch of hyper-nerd micro optimizations
- Added new style
- Fixed wrong manacost calculation
- Improved testing environment
- Improved documentation
- Optimized location usage
- Removed junk variables
- Reduced amount of global variable usage
- Underground dragon movement is no longer simulated
- No longer re-creating dummy unit
- New on hit special effect model
- Some default values adjustments
- Fixed wrong terrain z and unit z utilization
Previews
Contents

Glacial Dragon (Map)

  1. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Hmmm... I actually kind of like the idea you have here. A GUI spell that just has one trigger :p It is a little hard to read though without the indentation and colored syntax.
    • Did you copy-paste this from WEU? If so, could you update your description to have the vanilla World Editor functions?
    • I hate magic numbers in code :mad:
      • Set GlaciarDragon__TempLoc2 = (GlaciarDragon__TempLoc offset by 0.50 towards (Facing of GlaciarDragon__Caster[GlaciarDragon__TempInt2]) degrees)

      Make that 0.50 configurable and or explain its purpose!
    • Creating dummy units for the owner of the caster messes up the score board at the end of the game (which some people get anal over). It would be better to use any of the neutral players, unless of course you want the dragon to give vision.
    • Instead of always adding + removing Crow Form from the dummy unit, wouldn't it just be better to add it to the unit via Object Editor?
    • Between function GlaciarDragon_Damage and GlaciarDragon_InitDamage, there is a random Custom script line with nothing
    • Given the size of allocation + deallocation, why not just use linked list to save on performance?
    I didn't take a look at the onPeriodic function because... well its sort of a pain to read. I will look at it more closely on the next update.


    Awaiting Update
     
  2. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    I don't see any necessary change in your review.

    It's to make the unit keep its facing angle. Larger numbers may causing unit to face other angles because of path finding. Therefore, it should be kept away from user reach.

    The dummy units have 0 points value, it won't cause anything to the score. And yes the purpose is to allow player to have vision over it.

    It's spacing between functions and there are more like it in other functions too.

    Dynamic indexing is more commonly used in GUI. But if you are being nitpicky, maybe I can manage to update it one day.
     
  3. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I see three.
    The linked list was just a suggestion. It would really help with the readability, as most of what I said was.
     
  4. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    Nah, I'm not judging you but.. I thought moderator should have understood the approval criteria well. Nothing about those three is that required to change. Those can be improved but not a must.
     
  5. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Why are you in a rush to get this approved? I found enough time in my day to do a quick review of 2 submissions and to mark the resources I wanted to review later in the future, which is why I said this:

    I didn't reject your spell. I merely put it on "Awaiting Update" so I can come back to it when I can. I saw a few things that COULD be updated, especially the three I quoted on my 2nd post.
     
  6. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    I'm in no rush at all. Maybe I said a thing about approval criteria but I didn't mean the spell to be approved right now. Your review just isn't critical enough to tag the resource as needing fix.
     
  7. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Did you read my last sentence?

    Needs Fixed is not a thing anymore.
     
  8. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    needs fix != rejected
    needs fix = awaiting update

    go figure
     
  9. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    If you have an issue with my review, feel free to make a post in Admin or Staff contact. It's going to stuck on Awaiting Update when I find free time again. Anyway, if you think your submission isn't breaking any rules, take a look again.

    I don't understand the need for sarcasm.
     
    Last edited: Sep 30, 2016
  10. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    I have no problem with the awaiting update status. But rather the reasoning behind it. If you need me to elaborate, fine. "awaiting update" or formerly "needs fix" only given to resources with required critical update (contains leaks, etc.).
     
  11. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I told you exactly why I set it to awaiting update.


     
  12. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    I pointed out the issue under impression you are setting this to needs fix upon minor issues. But if it's indeed somehow helping you in keeping track of reviewed resources, then okay I can live with that. But as far as I remember moderators don't usually do it.

    I failed to see which part of rule this spell does not meet.
     
  13. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I couldn't find anything game breaking, so everything looks good. I think it's pretty cool that you kept a GUI spell in one trigger, but if you do plan on doing it again in the future, add more spaces between the functions. It became a pain looking for when a function started and ended.

    The spell is Approved, but my suggestions in the first post are still available for you if you ever feel like looking at it. Also, please make sure to update the triggers to the VANILLA one. I'm not entirely sure which ones you have posted right now.
     
  14. zv27

    zv27

    Joined:
    Aug 21, 2010
    Messages:
    293
    Resources:
    0
    Resources:
    0
    This spell requires imports.The question is, why it is not mentioned in the description.I think that would be very useful for beginners.
    This spell requires explanation of how to install.
     
  15. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    No it doesn't. The spell functions perfectly fine without the imports.

    Good point, not sure how I missed that one. @Quilnez, could you add How to Install instructions in the map + spell description.
     
  16. zv27

    zv27

    Joined:
    Aug 21, 2010
    Messages:
    293
    Resources:
    0
    Resources:
    0
    :p:thumbs_up: