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

GUI Chain Storm Bolt

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
A magical hammer that is thrown at an enemy unit, causing damage and stunning the target then jumps off to another target. Each jump decreases the damage dealt by 15%. Stuns for 1.5 seconds.
Level 1 - 70 Intial damage, jumps 4 times.
Level 2 - 140 Intial damage, jumps 6 times.
Level 3 - 210 Intial damage, jumps 8 times.
Level 4 - 280 Intial damage, jumps 10 times.

Cooldown: 18/16/14/12


  • CPSTART
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Storm Bolt
    • Actions
      • -------- IMPORTANT SYSTEM PART START --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CP_INDEX_LISTENER Equal to 0
        • Then - Actions
          • Trigger - Turn on CPLOOP <gen>
        • Else - Actions
      • -------- Check if the Recycle Container got free slots where you can grab an index --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CP_RECYCLE_SIZE Greater than 0
        • Then - Actions
          • Set CP_RECYCLE_SIZE = (CP_RECYCLE_SIZE - 1)
          • Set CP_CURRENT_INDEX = CP_RECYCLE_CONTAINER[CP_RECYCLE_SIZE]
        • Else - Actions
          • Set CP_CURRENT_INDEX = CP_INDEX_SIZE
          • Set CP_INDEX_SIZE = (CP_INDEX_SIZE + 1)
      • -------- IMPORTANT SYSTEM PART END --------
      • -------- Register all important variables, remember that the CURRENT_INDEX var is very important... --------
      • Set CP_CASTING_UNIT[CP_CURRENT_INDEX] = (Triggering unit)
      • Set CP_TARGET_UNIT[CP_CURRENT_INDEX] = (Target unit of ability being cast)
      • Unit - Create 1 Dummy Projectile for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
      • Set CP_MISSILE_UNIT[CP_CURRENT_INDEX] = (Last created unit)
      • Set CP_BOUNCES_LEFT[CP_CURRENT_INDEX] = (2 + (2 x (Level of (Ability being cast) for (Triggering unit))))
      • Set CP_PROJECTILE_SPEED[CP_CURRENT_INDEX] = 1200.00
      • Set CP_PROJECTILE_DAMAGE[CP_CURRENT_INDEX] = (70.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))
      • -------- IMPORTANT SYSTEM PART START --------
      • -------- Register the current index --------
      • Set CP_INDEX_CONTAINER[CP_INDEX_LISTENER] = CP_CURRENT_INDEX
      • -------- Increase the size of the Index Container --------
      • Set CP_INDEX_LISTENER = (CP_INDEX_LISTENER + 1)
      • -------- IMPORTANT SYSTEM PART END --------



  • CPLOOP
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Dynamic Loop --------
      • For each (Integer DYN2_EXAMPLE_LOOP) from 0 to (CP_INDEX_LISTENER - 1), do (Actions)
        • Loop - Actions
          • -------- Set the current index --------
          • Set CP_CURRENT_INDEX = CP_INDEX_CONTAINER[DYN2_EXAMPLE_LOOP]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CP_BOUNCES_LEFT[CP_CURRENT_INDEX] Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) and (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX])) Greater than 50.00
                • Then - Actions
                  • Unit - Move CP_MISSILE_UNIT[CP_CURRENT_INDEX] instantly to ((Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) offset by (0.03 x CP_PROJECTILE_SPEED[CP_CURRENT_INDEX]) towards (Angle from (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) to (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX])) degrees)
                  • -------- You can disable this function if you want. It only makes the projectile spin around. --------
                  • Unit - Make CP_MISSILE_UNIT[CP_CURRENT_INDEX] face ((Facing of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) + 60.00) over 0.00 seconds
                • Else - Actions
                  • Set CP_BOUNCES_LEFT[CP_CURRENT_INDEX] = (CP_BOUNCES_LEFT[CP_CURRENT_INDEX] - 1)
                  • Set CP_PROJECTILE_DAMAGE[CP_CURRENT_INDEX] = (CP_PROJECTILE_DAMAGE[CP_CURRENT_INDEX] - (CP_PROJECTILE_DAMAGE[CP_CURRENT_INDEX] x 0.15))
                  • Unit - Cause CP_CASTING_UNIT[CP_CURRENT_INDEX] to damage CP_TARGET_UNIT[CP_CURRENT_INDEX], dealing CP_PROJECTILE_DAMAGE[CP_CURRENT_INDEX] damage of attack type Chaos and damage type Unknown
                  • Unit - Create 1 DummyCaster for (Owner of CP_CASTING_UNIT[CP_CURRENT_INDEX]) at (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX]) facing Default building facing degrees
                  • Unit - Add Chain Storm Bolt Stun to (Last created unit)
                  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt CP_TARGET_UNIT[CP_CURRENT_INDEX]
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • Special Effect - Create a special effect attached to the origin of CP_TARGET_UNIT[CP_CURRENT_INDEX] using Abilities\Weapons\Bolt\BoltImpact.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set CP_UNITS_IN_RANGE[CP_CURRENT_INDEX] = (Units within 600.00 of (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX]))
                  • Set CP_POSSIBLE_TARGETS[CP_CURRENT_INDEX] = (Units within 600.00 of (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX]) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of CP_CASTING_UNIT[CP_CURRENT_INDEX])) Equal to True)) and (((((Matching un
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (CP_POSSIBLE_TARGETS[CP_CURRENT_INDEX] is empty) Equal to False
                    • Then - Actions
                      • Set CP_TARGET_UNIT[CP_CURRENT_INDEX] = (Random unit from CP_POSSIBLE_TARGETS[CP_CURRENT_INDEX])
                      • Unit - Kill CP_MISSILE_UNIT[CP_CURRENT_INDEX]
                      • Unit - Create 1 Dummy Projectile for (Owner of CP_CASTING_UNIT[CP_CURRENT_INDEX]) at (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) facing (Angle from (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) to (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX])) degrees
                      • Set CP_MISSILE_UNIT[CP_CURRENT_INDEX] = (Last created unit)
                      • Custom script: call DestroyGroup(udg_CP_UNITS_IN_RANGE[udg_CP_CURRENT_INDEX])
                      • Custom script: set udg_CP_UNITS_IN_RANGE[udg_CP_CURRENT_INDEX]=null
                      • Custom script: call DestroyGroup(udg_CP_POSSIBLE_TARGETS[udg_CP_CURRENT_INDEX])
                      • Custom script: set udg_CP_POSSIBLE_TARGETS[udg_CP_CURRENT_INDEX]=null
                    • Else - Actions
                      • Set CP_BOUNCES_LEFT[CP_CURRENT_INDEX] = 0
            • Else - Actions
              • Unit - Kill CP_MISSILE_UNIT[CP_CURRENT_INDEX]
              • Set CP_CASTING_UNIT[CP_CURRENT_INDEX] = No unit
              • Set CP_TARGET_UNIT[CP_CURRENT_INDEX] = No unit
              • Set CP_MISSILE_UNIT[CP_CURRENT_INDEX] = No unit
              • Set CP_BOUNCES_LEFT[CP_CURRENT_INDEX] = 0
              • Set CP_PROJECTILE_SPEED[CP_CURRENT_INDEX] = 0.00
              • Set CP_PROJECTILE_DAMAGE[CP_CURRENT_INDEX] = 0.00
              • Set CP_BOUNCES_LEFT[CP_CURRENT_INDEX] = 0
              • Custom script: call DestroyGroup(udg_CP_UNITS_IN_RANGE[udg_CP_CURRENT_INDEX])
              • Custom script: set udg_CP_UNITS_IN_RANGE[udg_CP_CURRENT_INDEX]=null
              • Custom script: call DestroyGroup(udg_CP_POSSIBLE_TARGETS[udg_CP_CURRENT_INDEX])
              • Custom script: set udg_CP_POSSIBLE_TARGETS[udg_CP_CURRENT_INDEX]=null
              • -------- IMPORTANT SYSTEM PART START --------
              • -------- Decrease the normal index container size --------
              • Set CP_INDEX_LISTENER = (CP_INDEX_LISTENER - 1)
              • -------- Exchange the data from the last index to the current index --------
              • Set CP_INDEX_CONTAINER[DYN2_EXAMPLE_LOOP] = CP_INDEX_CONTAINER[CP_INDEX_LISTENER]
              • -------- Add an index to the Recycle Container --------
              • Set CP_RECYCLE_CONTAINER[CP_RECYCLE_SIZE] = CP_CURRENT_INDEX
              • -------- Recycle Container Index Size gets increased --------
              • Set CP_RECYCLE_SIZE = (CP_RECYCLE_SIZE + 1)
              • -------- Reset Loop --------
              • Set DYN2_EXAMPLE_LOOP = (DYN2_EXAMPLE_LOOP - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CP_INDEX_LISTENER Equal to 0
                • Then - Actions
                  • Trigger - Turn off CPLOOP <gen>
                  • Skip remaining actions
                • Else - Actions
              • -------- IMPORTANT SYSTEM PART END --------


System derived from Hanky's Dynamic Indexing.


-Fixed unit leaks
-Fixed unit group leaks


Keywords:
chain,bounce,storm bolt,thor,mjolnr,thunder,lightning,stun,chain lightning,random,stun
Contents

Chain Storm Bolt (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 13:59, 29th Sep 2013 Maker: Fix the leaks -> Things that leak
Level 16
Joined
Jul 31, 2012
Messages
2,217
1.00 Review

Close

Review

Suggestions

Rating

Judgement

My Words

Having 2 instances of this spell running makes the 3rd or any more instance impossible, meaning the 3rd instance will only damage and stun the first target without any bounce
  • Unit - Create 1 Dummy Projectile for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
  • /////////////////////////////////////////////////////////////////////////
  • (Distance between (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) and (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX])) Greater than 50.00
  • /////////////////////////////////////////////////////////////////////////
  • Unit - Move CP_MISSILE_UNIT[CP_CURRENT_INDEX] instantly to ((Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) offset by (0.03 x CP_PROJECTILE_SPEED[CP_CURRENT_INDEX]) towards (Angle from (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) to (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX])) degrees)
  • /////////////////////////////////////////////////////////////////////////
  • Unit - Create 1 DummyCaster for (Owner of CP_CASTING_UNIT[CP_CURRENT_INDEX]) at (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX]) facing Default building facing degrees
  • /////////////////////////////////////////////////////////////////////////
  • Unit Group - Pick every unit in (Units within 600.00 of (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX])) and do (Actions)
  • /////////////////////////////////////////////////////////////////////////
  • Unit - Create 1 Dummy Projectile for (Owner of CP_CASTING_UNIT[CP_CURRENT_INDEX]) at (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) facing (Angle from (Position of CP_MISSILE_UNIT[CP_CURRENT_INDEX]) to (Position of CP_TARGET_UNIT[CP_CURRENT_INDEX])) degrees
you leak 7 points here ^ and 1 group leak
  • Skip remaining actions
There is absolutely no need for this ^
Add a configuration trigger to to change the settings of the spell especially the damage decrease %
It's a good spell you have here but you definitely need to fix the leaks
I don't have any for now
225233-albums6523-picture74070.jpg
225233-albums6523-picture74105.jpg
If You want me to review an Update of This Spell, Please Notifiy me this by VM or PM
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
There's still leaks :p, store points to the variable so that you can remove that location or point. This must be configurable. You leak sooooooooooooooo many points and use coordinates in moving the projectile or missile. There are so many that needs to fix in the trigger of the spell: Needs Fix 2/5 :(
 
Top