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

Glass Cannon v0.01

An Icy version of Arcane Missiles from WoW.

Channels bolts of ice at target, shooting bolts of ice at target, which deal damage.
NOTE : This spell is channeled and is interupted by ordering any order during channeling of the spell.

If you use this in your map, give me credits


  • Glass Cannon Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Glass Cannon
    • Actions
      • -------- Stores Caster and Target into variables --------
      • Set Caster = (Triggering unit)
      • Set Target = (Target unit of ability being cast)
      • -------- Sets the amount of time between it will shoot --------
      • -------- NOTE 1: Change your shooting interval here --------
      • Set Real[1] = 1.00
      • -------- Stores shooting AoE into variable --------
      • -------- NOTE 2: Change your shooting AoE here --------
      • -------- NOTE 3: To make the AoE infinite, just make this number to 9999999999 --------
      • Set Real[2] = 850.00
      • -------- Stores the damage dealt per shot into variable --------
      • -------- NOTE 4: Change your damage per shot here --------
      • Set Real[3] = 75.00
      • -------- Stores maximum shots into variable --------
      • -------- NOTE 5: Change your maximum shots here --------
      • Set Integer = (1 + (Level of Glass Cannon for Caster))
      • -------- Stores all the information into hashtable --------
      • -------- NOTE 6: All the information is attached to Caster --------
      • -------- NOTE 7: Stores the shooting interval twice to make it possible to reset the timer when shot is made --------
      • Hashtable - Save Handle OfTarget as 0 of (Key (Triggering unit)) in Hashtable
      • Hashtable - Save Real[1] as 1 of (Key (Triggering unit)) in Hashtable
      • Hashtable - Save Real[1] as 2 of (Key (Triggering unit)) in Hashtable
      • Hashtable - Save Real[2] as 3 of (Key (Triggering unit)) in Hashtable
      • Hashtable - Save Real[3] as 4 of (Key (Triggering unit)) in Hashtable
      • Hashtable - Save Integer as 5 of (Key (Triggering unit)) in Hashtable
      • -------- Checks if there is any instance of spell already running --------
      • -------- If not, turns the shooting trigger on --------
      • If ((Casters is empty) Equal to True) then do (Trigger - Turn on Glass Cannon Shoot <gen>) else do (Do nothing)
      • -------- Adds caster to Casters' group --------
      • Unit Group - Add Caster to Casters
  • Glass Cannon Shoot
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Casters and do (Actions)
        • Loop - Actions
          • -------- Stores Caster and Target into variables --------
          • Set Caster = (Picked unit)
          • Set Target = (Load 0 of (Key (Picked unit)) in Hashtable)
          • -------- Finds locations of Caster and Target --------
          • Set Points[1] = (Position of Caster)
          • Set Points[2] = (Position of Target)
          • -------- Loads time left until next shot and reduces it by 0.05 (the loop interval of this trigger) --------
          • Set Real[1] = (Load 1 of (Key (Picked unit)) from Hashtable)
          • Set Real[1] = (Real[1] - 0.05)
          • -------- Counts the Distance between Caster and Target --------
          • Set Real[2] = (Distance between Points[1] and Points[2])
          • -------- Loads the shooting AoE to check if Caster and Target are close enough to shoot --------
          • Set Real[3] = (Load 3 of (Key (Picked unit)) from Hashtable)
          • -------- Loads shots left to make --------
          • Set Integer = (Load 5 of (Key (Picked unit)) from Hashtable)
          • -------- If Caster and Target are alive and they are in the shooting range... --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Real[2] Less than or equal to Real[3]
              • (Caster is alive) Equal to True
              • (Target is alive) Equal to True
            • Then - Actions
              • -------- Checks if it is time to shoot --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Real[1] Equal to 0.00
                • Then - Actions
                  • -------- If it is, then... --------
                  • -------- Finds a location where will the bolt will be created --------
                  • Set Points[3] = (Points[1] offset by 70.00 towards (Angle from Points[1] to Points[2]) degrees)
                  • -------- Loads the damage to deal --------
                  • Set Real[4] = (Load 4 of (Key (Picked unit)) from Hashtable)
                  • -------- Creates the Bolt --------
                  • -------- NOTE 1: To change the model of the Bolt, change the model file of the Dummy Bolt unit in Object Editor --------
                  • Unit - Create 1 Dummy Bolt for (Owner of Caster) at Points[3] facing (Angle from Points[1] to Points[2]) degrees
                  • -------- Turns collision off for bolt --------
                  • Unit - Turn collision for (Last created unit) Off
                  • -------- Stores all the information needed into Hashtable --------
                  • -------- NOTE 2: All information is attached to the Dummy Bolt unit --------
                  • Hashtable - Save Handle OfTarget as 0 of (Key (Last created unit)) in Hashtable
                  • Hashtable - Save Handle OfCaster as 1 of (Key (Last created unit)) in Hashtable
                  • Hashtable - Save Real[4] as 2 of (Key (Last created unit)) in Hashtable
                  • -------- Checks if there is any bolt already in effect of the Sliding trigger --------
                  • -------- If not, then turns the Sliding trigger on --------
                  • If ((Missiles is empty) Equal to True) then do (Trigger - Turn on Glass Cannon Slide <gen>) else do (Do nothing)
                  • -------- Adds dummy bolt to the Missiles' group --------
                  • Unit Group - Add (Last created unit) to Missiles
                  • -------- Reduces shots-to-do by 1 --------
                  • Set Integer = (Integer - 1)
                  • -------- Removes leak made here --------
                  • Custom script: call RemoveLocation(udg_Points[3])
                  • -------- Checks if there is any shot-to-make left --------
                  • -------- If not... --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer Equal to 0
                    • Then - Actions
                      • -------- Clears the Hashtable --------
                      • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
                      • -------- Removes Caster from Casters' group --------
                      • Unit Group - Remove (Picked unit) from Casters
                    • Else - Actions
                      • Hashtable - Save Integer as 5 of (Key (Picked unit)) in Hashtable
                      • -------- Loads the full interval of shooting --------
                      • Set Real[1] = (Load 2 of (Key (Picked unit)) from Hashtable)
                      • Hashtable - Save Real[1] as 1 of (Key (Picked unit)) in Hashtable
                • Else - Actions
                  • -------- Else saves time left for next shot --------
                  • Hashtable - Save Real[1] as 1 of (Key (Picked unit)) in Hashtable
            • Else - Actions
              • -------- If any caster or target is dead, or they are too far to shoot, then... --------
              • -------- Clears the Hashtable --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
              • -------- Removes Caster from Casters' group --------
              • Unit Group - Remove (Picked unit) from Casters
              • -------- Issues Caster to Hold Position (if it isn't dead already) --------
              • Unit - Order Caster to Hold Position
          • -------- Removes Leaks --------
          • Custom script: call RemoveLocation(udg_Points[1])
          • Custom script: call RemoveLocation(udg_Points[2])
      • -------- Checks if there is any instance of spell left after this loop --------
      • -------- If not, turns this trigger off --------
      • If ((Casters is empty) Equal to True) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
  • Glass Cannon Slide
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Missiles and do (Actions)
        • Loop - Actions
          • -------- Loads Caster and Target --------
          • Set Target = (Load 0 of (Key (Picked unit)) in Hashtable)
          • Set Caster = (Load 1 of (Key (Picked unit)) in Hashtable)
          • -------- Finds locations of Dummy Bolt unit and Target --------
          • Set Points[1] = (Position of (Picked unit))
          • Set Points[2] = (Position of Target)
          • -------- Finds location at which Dummy Bolt unit would be moved --------
          • Set Points[3] = (Points[1] offset by 32.00 towards (Angle from Points[1] to Points[2]) degrees)
          • -------- If the Distance between dummy bolt unit and Target is 100 or greater, then... --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Points[1] and Points[2]) Greater than or equal to 100.00
            • Then - Actions
              • -------- Moves Dummy bolt unit to Points[3] --------
              • Unit - Move (Picked unit) instantly to Points[3], facing (Angle from Points[1] to Points[2]) degrees
            • Else - Actions
              • -------- Else... --------
              • -------- Loads the Damage-to-deal --------
              • Set Real[1] = (Load 2 of (Key (Picked unit)) from Hashtable)
              • -------- Causes Caster to Damage target --------
              • Unit - Cause Caster to damage Target, dealing Real[1] damage of attack type Spells and damage type Normal
              • -------- Plays the Impact animation and instantly destroys it, fixing the leak --------
              • -------- NOTE 1: Change this to fit your Dummy Missile's model. You don't want that fire would impact in blue slat, do you? --------
              • Special Effect - Create a special effect attached to the chest of Target using Abilities\Weapons\LichMissile\LichMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- Clears the Hashtable --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
              • -------- Remvoes Dummy Bolt unit from Missiles' group --------
              • Unit Group - Remove (Picked unit) from Missiles
              • -------- Removes Dummy Bolt unit from game --------
              • Unit - Remove (Picked unit) from the game
          • -------- Clears the Leaks --------
          • Custom script: call RemoveLocation(udg_Points[1])
          • Custom script: call RemoveLocation(udg_Points[2])
          • Custom script: call RemoveLocation(udg_Points[3])
      • -------- Checks if there is any bolt left after loop --------
      • -------- If not, then turns this trigger off --------
      • If ((Missiles is empty) Equal to True) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
  • Glass Cannon Cancel
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Triggering unit) is in Casters) Equal to True
    • Actions
      • -------- This trigger is only for making Caster available to move --------
      • -------- It only works, if unit is ordered to do anything else after starting channeling the spell --------
      • -------- It simply cuts the effect of Spell, if Caster is issued an order during Channeling --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Clears the Hashtable --------
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Hashtable
      • -------- Removes Caster from Casters' group --------
      • Unit Group - Remove (Triggering unit) from Casters
v0.01 - First Released


Keywords:
Arcane, missiles, frost, ice, bolts, channel, channeling, channeled, WoW, mage
Contents

Glass Cannon v0.01 (Map)

Reviews
09:46, 25th Jun 2010 The_Reborn_Devil: The triggering looks good and it seems to be MUI. Well documented too. You could consider using an indexing system instead of hashtables to make it slightly more efficient, but that's not necessary...

Moderator

M

Moderator

09:46, 25th Jun 2010
The_Reborn_Devil:

The triggering looks good and it seems to be MUI. Well documented too. You could consider using an indexing system instead of hashtables to make it slightly more efficient, but that's not necessary.


Status: Approved
Rating: Useful
 
Level 9
Joined
Oct 31, 2009
Messages
121
I hope you will like this, I've noticed that nobody didn't bother to make such a thing, so I decided to make one.

The screenshot is quite lame, and tells much nothing about spell, it should be tested.

I''d like to get any comments from you to see your thoughts about this
 
Last edited:
Top