1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. The 3rd Melee Mapping Contest is ON! Join in on a ride of a 4v4 melee experience!
    Dismiss Notice
  3. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  4. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    Dismiss Notice
  5. The Aftermath has been revealed! Choose which entry should win in the 19th Terraining Contest Poll.
    Dismiss Notice

Glass Cannon v0.01

Submitted by G00dG4m3
This bundle is marked as approved. It works and satisfies the submission rules.
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

Triggers

Glass Cannon Cast
  • 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 Canoon Shooting
  • 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
  • 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
  • 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


Changelog
v0.01 - First Released


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

Glass Cannon v0.01 (Map)

Reviews
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....
  1. 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
     
  2. G00dG4m3

    G00dG4m3

    Joined:
    Oct 31, 2009
    Messages:
    97
    Resources:
    16
    Maps:
    1
    Spells:
    15
    Resources:
    16
    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: Jun 24, 2010
  3. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,547
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Why exactly are you using two loops/every 0.0X seconds?
    x = number

    there should never be a need for it, even if it's so 'one of the functions must always be before the other' in this cercumstance the two loops would run at the same time every 0.20 seconds anyway, so I don't really see the point.
     
  4. G00dG4m3

    G00dG4m3

    Joined:
    Oct 31, 2009
    Messages:
    97
    Resources:
    16
    Maps:
    1
    Spells:
    15
    Resources:
    16
    One is for bolt sliding and another is for bolt shooting.
    Simple isn't it?
     
  5. Blaxor

    Blaxor

    Joined:
    Sep 6, 2008
    Messages:
    411
    Resources:
    7
    Models:
    1
    Icons:
    6
    Resources:
    7
    You should be able to have both in the same loop.. or have I been away from the trigger editor for far too long?
     
  6. Hitsugaya.Daijo

    Hitsugaya.Daijo

    Joined:
    May 5, 2010
    Messages:
    18
    Resources:
    0
    Resources:
    0
    The Triggers are to complex for all it does, but I like it.
     
  7. G00dG4m3

    G00dG4m3

    Joined:
    Oct 31, 2009
    Messages:
    97
    Resources:
    16
    Maps:
    1
    Spells:
    15
    Resources:
    16
    You see, it's much easier to turn off triggers if they are seperate.
    It for situations when Caster shot the last shot. The shooting trigger is now off, but bolt sliding trigger is still on for.. well, sliding the bolt.
     
  8. Arisato

    Arisato

    Joined:
    Dec 17, 2009
    Messages:
    991
    Resources:
    7
    Models:
    1
    Maps:
    4
    Spells:
    1
    Tutorials:
    1
    Resources:
    7
    uhh... how can i learn things like this.. just looking at it i feel 100.000001 % confused:confused:
     
  9. G00dG4m3

    G00dG4m3

    Joined:
    Oct 31, 2009
    Messages:
    97
    Resources:
    16
    Maps:
    1
    Spells:
    15
    Resources:
    16
    Well, I think it is much easier to understand than Indexing-based MUI spells. :p

    However, this spell isn't one I created learning Hashtabling :D