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

Shock Lance

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
  • Like
Reactions: Flux
This spell is made for Mountain Dwarf Runebreaker model.

The spell is based on the "Bear Form" ability. The caster gets the buff which immoblises (optional) it but allow to cast lightning to penetrate enemies dealing rapid damage. Use right click mouse or move order to change direction of the lightning. Any other action will break the effect.

PAY ATTENTION: HIT AREA HAS RECT FORM, NOT CONE OR CIRCLE.
There are 5 triggers in the map + support folder triggers.
Support folder "HOW TO IMPORT" contains the "HOW TO IMPORT" trigger.
The trigger is used only for the test map.
The main folder named "SHOCK LANCE" contains 5 main triggers.
"SHOCKL INIT" - the trigger where You can set the ability parameters.
"SHOCKL USE" - the trigger which of the ability using.
"SHOCKL LOOP" - the trigger supports loop actions.
"SHOCKL BEHAVIOR 1/2" - support reaction of the hero on player action.
All parameters can be set in the "SHOCKL INIT":


LIGHTNING HEIGHT (VISUAL) - Visual parameter to change the lightning height.
IMMOBILISING - Boolean variable. Does the ability hold unit while channeling or not.
LIGHTNING DISTANCE - Distance of lightning. Also distance of hit. It means it is both visual and functional parameter.
LIGHTNING WIDTH (HIT AREA) - Unlike the previous parameter this one only functional, it doesn't increase visual lightning width. Technically it is width of rect (hit area).
DAMAGE PET TICK - Deals damage to enemies inside the hit area.
TICK PERIOD - Rate of damage.
BURNS MANA EVERY TICK - The channeling burns the caster's mana every tick. Set 0 to disable the parameter.
  • HOW TO IMPORT
    • Events
    • Conditions
    • Actions
      • -------- 1. IMPORT CUSTOM ABILITY AND 2 custom heroes --------
      • -------- (CUSTOM HEROES MUST HAVE "Shock Lance" ABILITY. --------
      • -------- OPTIONAL: IMPORT DWARF RUNEBREAKER MODEL --------
      • -------- 2. COPY ALL TRIGGERS FROM THE "SHOCKL INIT" FOLDER. --------
      • -------- 3. SET RIGHT PARAMETERS IN THE "SHOCKL INIT". --------
      • -------- 4. SET RIGHT PARAMETERS IN THE "Shock Lance" ability. --------
      • -------- 4. BE SURE ALL CUSTOM OBJECT WERE SET PROPERLY LIKE IN THE TEMPLATE --------
full
  • SHOCKL INIT
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Unit Group - Remove all units from SHOCKL_GROUP
      • Unit Group - Remove all units from SHOCKL_TEMPGROUP
      • Unit Group - Remove all units from SHOCKL_GROUP_SPELLRESET
      • Hashtable - Create a hashtable
      • Set SHOCKL_HASH = (Last created hashtable)
      • Set SHOCKL_ATTACKTYPE = Spells
      • Set SHOCKL_DAMAGETYPE = Lightning
      • Set SHOCKL_ABILITY = Shock Lance
      • -------- // --------
      • -------- // --------
      • -------- LIGHTNING HEIGHT (VISUAL) --------
      • Set SHOCKL_HEIGHT = 80.00
      • -------- IMMOBILISING --------
      • Set SHOCKL_IMMOBILISE = False
      • -------- LIGHTNING DISTANCE --------
      • Set SHOCKL_DISTANCE[1] = 600.00
      • Set SHOCKL_DISTANCE[2] = 600.00
      • Set SHOCKL_DISTANCE[3] = 600.00
      • -------- LIGHTNING WIDTH (HIT AREA) --------
      • Set SHOCKL_WIDTH[1] = 50.00
      • Set SHOCKL_WIDTH[2] = 50.00
      • Set SHOCKL_WIDTH[3] = 50.00
      • -------- DAMAGE PER TICK --------
      • Set SHOCKL_DAMAGE[1] = 10.00
      • Set SHOCKL_DAMAGE[2] = 15.00
      • Set SHOCKL_DAMAGE[3] = 20.00
      • -------- TICK PERIOD --------
      • Set SHOCKL_PERIOD[1] = 0.10
      • Set SHOCKL_PERIOD[2] = 0.10
      • Set SHOCKL_PERIOD[3] = 0.10
      • -------- BURNS MANA EVERY TICK --------
      • Set SHOCKL_MANACOST[1] = 4.00
      • Set SHOCKL_MANACOST[2] = 6.00
      • Set SHOCKL_MANACOST[3] = 8.00
  • SHOCKL USE
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of SHOCKL_ABILITY for (Triggering unit)) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(bearform))
            • Then - Actions
              • Set SHOCKL_UNIT[0] = (Triggering unit)
              • Custom script: set udg_SHOCKL_INT = GetHandleIdBJ( udg_SHOCKL_UNIT[0])
              • Set SHOCKL_ABI_LEVEL = (Level of SHOCKL_ABILITY for SHOCKL_UNIT[0])
              • Custom script: set udg_SHOCKL_LIGHTN = LoadLightningHandleBJ(0, udg_SHOCKL_INT, udg_SHOCKL_HASH)
              • Custom script: call DestroyLightningBJ( udg_SHOCKL_LIGHTN )
              • Unit Group - Remove SHOCKL_UNIT[0] from SHOCKL_GROUP
              • Hashtable - Clear all child hashtables of child SHOCKL_INT in SHOCKL_HASH
              • Set SHOCKL_POINT[0] = (Position of (Triggering unit))
              • Hashtable - Save SHOCKL_PERIOD[SHOCKL_ABI_LEVEL] as 1 of SHOCKL_INT in SHOCKL_HASH
              • Hashtable - Save SHOCKL_PERIOD[SHOCKL_ABI_LEVEL] as 2 of SHOCKL_INT in SHOCKL_HASH
              • Hashtable - Save SHOCKL_DISTANCE[SHOCKL_ABI_LEVEL] as 3 of SHOCKL_INT in SHOCKL_HASH
              • Hashtable - Save SHOCKL_WIDTH[SHOCKL_ABI_LEVEL] as 4 of SHOCKL_INT in SHOCKL_HASH
              • Hashtable - Save SHOCKL_DAMAGE[SHOCKL_ABI_LEVEL] as 5 of SHOCKL_INT in SHOCKL_HASH
              • Hashtable - Save 0.40 as 7 of SHOCKL_INT in SHOCKL_HASH
              • Hashtable - Save SHOCKL_MANACOST[SHOCKL_ABI_LEVEL] as 8 of SHOCKL_INT in SHOCKL_HASH
              • Set SHOCKL_POINT[1] = (SHOCKL_POINT[0] offset by (Load 3 of SHOCKL_INT from SHOCKL_HASH) towards (Facing of SHOCKL_UNIT[0]) degrees)
              • Set SHOCKL_POINT[2] = (SHOCKL_POINT[0] offset by 50.00 towards ((Facing of SHOCKL_UNIT[0]) + 20.00) degrees)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Mana of SHOCKL_UNIT[0]) Greater than or equal to (Load 8 of SHOCKL_INT from SHOCKL_HASH)
                • Then - Actions
                  • Custom script: set udg_SHOCKL_LIGHTN = AddLightningEx( "CLPB", true, GetLocationX(udg_SHOCKL_POINT[2]), GetLocationY(udg_SHOCKL_POINT[2]), udg_SHOCKL_HEIGHT, GetLocationX(udg_SHOCKL_POINT[1]), GetLocationY(udg_SHOCKL_POINT[1]), udg_SHOCKL_HEIGHT )
                  • Custom script: call SaveLightningHandleBJ( udg_SHOCKL_LIGHTN, 0, udg_SHOCKL_INT, udg_SHOCKL_HASH )
                • Else - Actions
              • Custom script: call RemoveLocation( udg_SHOCKL_POINT[0] )
              • Custom script: call RemoveLocation( udg_SHOCKL_POINT[1] )
              • Custom script: call RemoveLocation( udg_SHOCKL_POINT[2] )
              • Unit Group - Add SHOCKL_UNIT[0] to SHOCKL_GROUP
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SHOCKL_IMMOBILISE Equal to True
                • Then - Actions
                  • Unit - Set SHOCKL_UNIT[0] movement speed to 0.00
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Issued order) Equal to (Order(unbearform))
                • Then - Actions
                  • Set SHOCKL_UNIT[0] = (Triggering unit)
                  • Unit - Set SHOCKL_UNIT[0] movement speed to (Default movement speed of SHOCKL_UNIT[0])
                  • Unit Group - Remove SHOCKL_UNIT[0] from SHOCKL_GROUP
                  • Custom script: set udg_SHOCKL_LIGHTN = LoadLightningHandleBJ(0, udg_SHOCKL_INT, udg_SHOCKL_HASH)
                  • Custom script: call DestroyLightningBJ( udg_SHOCKL_LIGHTN )
                  • Hashtable - Clear all child hashtables of child SHOCKL_INT in SHOCKL_HASH
                • Else - Actions
        • Else - Actions
  • SHOCKL LOOP
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in SHOCKL_GROUP_SPELLRESET) Greater than 0
        • Then - Actions
          • Set SHOCKL_REAL[0] = 0.02
          • Unit Group - Pick every unit in SHOCKL_GROUP_SPELLRESET and do (Actions)
            • Loop - Actions
              • Set SHOCKL_UNIT[0] = (Picked unit)
              • Unit - Remove SHOCKL_ABILITY from SHOCKL_UNIT[0]
              • Set SHOCKL_INT = (Level of SHOCKL_ABILITY for SHOCKL_UNIT[0])
              • Unit - Add SHOCKL_ABILITY to SHOCKL_UNIT[0]
              • Unit - Set level of SHOCKL_ABILITY for SHOCKL_UNIT[0] to SHOCKL_INT
              • Unit Group - Remove SHOCKL_UNIT[0] from SHOCKL_GROUP
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in SHOCKL_GROUP) Greater than 0
        • Then - Actions
          • Set SHOCKL_REAL[0] = 0.02
          • Unit Group - Pick every unit in SHOCKL_GROUP and do (Actions)
            • Loop - Actions
              • Set SHOCKL_UNIT[0] = (Picked unit)
              • Custom script: set udg_SHOCKL_INT = GetHandleIdBJ( udg_SHOCKL_UNIT[0])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 7 of SHOCKL_INT from SHOCKL_HASH) Greater than 0.00
                • Then - Actions
                  • Animation - Play SHOCKL_UNIT[0]'s Stand Defend animation
                  • Set SHOCKL_REAL[2] = (Load 7 of SHOCKL_INT from SHOCKL_HASH)
                  • Set SHOCKL_REAL[2] = (SHOCKL_REAL[2] - SHOCKL_REAL[0])
                  • Hashtable - Save SHOCKL_REAL[2] as 7 of SHOCKL_INT in SHOCKL_HASH
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (Mana of SHOCKL_UNIT[0]) Greater than or equal to (Load 8 of SHOCKL_INT from SHOCKL_HASH)
                      • (SHOCKL_UNIT[0] is alive) Equal to True
                      • (SHOCKL_UNIT[0] is paused) Not equal to True
                      • (SHOCKL_UNIT[0] is hidden) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Volcano (Area)) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Stunned) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Stunned (Pause)) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Cluster Rockets) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Impale) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Cyclone) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Tornado Spin (Area)) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Sleep) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Aerial Shackles) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Silence) Not equal to True
                      • (SHOCKL_UNIT[0] has buff Soul Burn) Not equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SHOCKL_IMMOBILISE Equal to True
                    • Then - Actions
                      • Unit - Set SHOCKL_UNIT[0] movement speed to 0.00
                      • Animation - Play SHOCKL_UNIT[0]'s Stand Defend animation
                    • Else - Actions
                  • Set SHOCKL_POINT[0] = (Position of SHOCKL_UNIT[0])
                  • Set SHOCKL_POINT[1] = (SHOCKL_POINT[0] offset by (Load 3 of SHOCKL_INT from SHOCKL_HASH) towards (Facing of SHOCKL_UNIT[0]) degrees)
                  • Set SHOCKL_POINT[2] = (SHOCKL_POINT[0] offset by 50.00 towards ((Facing of SHOCKL_UNIT[0]) + 20.00) degrees)
                  • Set SHOCKL_REAL[1] = (Load 2 of SHOCKL_INT from SHOCKL_HASH)
                  • Set SHOCKL_REAL[1] = (SHOCKL_REAL[1] + SHOCKL_REAL[0])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SHOCKL_REAL[1] Greater than or equal to (Load 1 of SHOCKL_INT from SHOCKL_HASH)
                    • Then - Actions
                      • Unit - Set mana of SHOCKL_UNIT[0] to ((Mana of SHOCKL_UNIT[0]) - (Load 8 of SHOCKL_INT from SHOCKL_HASH))
                      • Set SHOCKL_TEMPGROUP = (Units within ((Load 3 of SHOCKL_INT from SHOCKL_HASH) + (Load 4 of SHOCKL_INT from SHOCKL_HASH)) of SHOCKL_POINT[0] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is Magic I
                      • Unit Group - Pick every unit in SHOCKL_TEMPGROUP and do (Actions)
                        • Loop - Actions
                          • Set SHOCKL_UNIT[1] = (Picked unit)
                          • Set SHOCKL_POINT[3] = (Position of SHOCKL_UNIT[1])
                          • Set SHOCKL_REAL[2] = ((Facing of SHOCKL_UNIT[0]) + 0.00)
                          • Set SHOCKL_REAL[3] = (Angle from SHOCKL_POINT[2] to SHOCKL_POINT[3])
                          • Set SHOCKL_REAL[3] = (SHOCKL_REAL[2] - SHOCKL_REAL[3])
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • SHOCKL_REAL[3] Greater than or equal to -90.00
                              • SHOCKL_REAL[3] Less than 0.00
                            • Then - Actions
                              • Set SHOCKL_REAL[3] = (SHOCKL_REAL[3] + 360.00)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • SHOCKL_REAL[3] Greater than or equal to 360.00
                            • Then - Actions
                              • Set SHOCKL_REAL[3] = (SHOCKL_REAL[3] - 360.00)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Or - Any (Conditions) are true
                                • Conditions
                                  • And - All (Conditions) are true
                                    • Conditions
                                      • SHOCKL_REAL[3] Greater than or equal to 270.00
                                      • SHOCKL_REAL[3] Less than or equal to 360.00
                                  • And - All (Conditions) are true
                                    • Conditions
                                      • SHOCKL_REAL[3] Greater than or equal to 0.00
                                      • SHOCKL_REAL[3] Less than or equal to 90.00
                            • Then - Actions
                              • Set SHOCKL_POINT[4] = (SHOCKL_POINT[2] offset by ((Distance between SHOCKL_POINT[2] and SHOCKL_POINT[3]) x (Abs((Cos(SHOCKL_REAL[3]))))) towards (Facing of SHOCKL_UNIT[0]) degrees)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Distance between SHOCKL_POINT[3] and SHOCKL_POINT[4]) Less than or equal to ((Load 4 of SHOCKL_INT from SHOCKL_HASH) / 2.00)
                                • Then - Actions
                                  • Unit - Cause SHOCKL_UNIT[0] to damage SHOCKL_UNIT[1], dealing (Load 5 of SHOCKL_INT from SHOCKL_HASH) damage of attack type SHOCKL_ATTACKTYPE and damage type SHOCKL_DAMAGETYPE
                                  • Custom script: call DestroyEffectBJ( AddSpecialEffectTarget("Abilities\\Weapons\\Bolt\\BoltImpact.mdl", udg_SHOCKL_UNIT[1], "head") )
                                • Else - Actions
                              • Custom script: call RemoveLocation( udg_SHOCKL_POINT[4] )
                            • Else - Actions
                          • Custom script: call RemoveLocation( udg_SHOCKL_POINT[3] )
                      • Custom script: call DestroyGroup( udg_SHOCKL_TEMPGROUP )
                      • Set SHOCKL_REAL[1] = 0.00
                    • Else - Actions
                  • Hashtable - Save SHOCKL_REAL[1] as 2 of SHOCKL_INT in SHOCKL_HASH
                  • Custom script: set udg_SHOCKL_LIGHTN = LoadLightningHandleBJ(0, udg_SHOCKL_INT, udg_SHOCKL_HASH)
                  • Custom script: call MoveLightningEx( udg_SHOCKL_LIGHTN, true, GetLocationX(udg_SHOCKL_POINT[2]), GetLocationY(udg_SHOCKL_POINT[2]), udg_SHOCKL_HEIGHT, GetLocationX(udg_SHOCKL_POINT[1]), GetLocationY(udg_SHOCKL_POINT[1]), 0 )
                  • Custom script: call RemoveLocation( udg_SHOCKL_POINT[0] )
                  • Custom script: call RemoveLocation( udg_SHOCKL_POINT[1] )
                  • Custom script: call RemoveLocation( udg_SHOCKL_POINT[2] )
                • Else - Actions
                  • Set SHOCKL_UNIT[0] = (Picked unit)
                  • Unit - Set SHOCKL_UNIT[0] movement speed to (Default movement speed of SHOCKL_UNIT[0])
                  • Unit Group - Remove SHOCKL_UNIT[0] from SHOCKL_GROUP
                  • Unit Group - Add SHOCKL_UNIT[0] to SHOCKL_GROUP_SPELLRESET
                  • Custom script: set udg_SHOCKL_LIGHTN = LoadLightningHandleBJ(0, udg_SHOCKL_INT, udg_SHOCKL_HASH)
                  • Custom script: call DestroyLightningBJ( udg_SHOCKL_LIGHTN )
                  • Hashtable - Clear all child hashtables of child SHOCKL_INT in SHOCKL_HASH
        • Else - Actions
  • SHOCKL BEHAVIOR 1
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Triggering unit) is in SHOCKL_GROUP) Equal to True
      • ((Target unit of issued order) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(smart))
          • (Issued order) Equal to (Order(move))
    • Actions
      • Set SHOCKL_UNIT[0] = (Triggering unit)
      • Set SHOCKL_POINT[0] = (Position of (Triggering unit))
      • Set SHOCKL_POINT[1] = (Position of (Target unit of issued order))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current movement speed of SHOCKL_UNIT[0]) Greater than 0.00
        • Then - Actions
          • Custom script: set udg_SHOCKL_INT = GetHandleIdBJ( udg_SHOCKL_UNIT[0])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between SHOCKL_POINT[0] and SHOCKL_POINT[1]) Greater than or equal to (Load 3 of SHOCKL_INT from SHOCKL_HASH)
            • Then - Actions
              • Set SHOCKL_POINT[2] = (SHOCKL_POINT[0] offset by (0.80 x (Load 3 of SHOCKL_INT from SHOCKL_HASH)) towards (Angle from SHOCKL_POINT[0] to SHOCKL_POINT[1]) degrees)
              • Custom script: call IssuePointOrderLoc( udg_SHOCKL_UNIT[0], OrderId2StringBJ(GetIssuedOrderIdBJ()), udg_SHOCKL_POINT[2] )
              • Custom script: call RemoveLocation( udg_SHOCKL_POINT[2] )
            • Else - Actions
              • Unit - Order SHOCKL_UNIT[0] to Stop
              • Unit - Make SHOCKL_UNIT[0] face SHOCKL_POINT[1] over 0.00 seconds
        • Else - Actions
          • Unit - Order SHOCKL_UNIT[0] to Stop
          • Unit - Make SHOCKL_UNIT[0] face SHOCKL_POINT[1] over 0.00 seconds
      • Custom script: call RemoveLocation( udg_SHOCKL_POINT[0] )
      • Custom script: call RemoveLocation( udg_SHOCKL_POINT[1] )
  • SHOCKL BEHAVIOR 2
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • ((Triggering unit) is in SHOCKL_GROUP) Equal to True
      • ((Target unit of issued order) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
      • (Current movement speed of SHOCKL_UNIT[0]) Equal to 0.00
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(smart))
          • (Issued order) Equal to (Order(move))
    • Actions
      • Set SHOCKL_UNIT[0] = (Triggering unit)
      • Set SHOCKL_POINT[0] = (Position of (Triggering unit))
      • Set SHOCKL_POINT[1] = (Target point of issued order)
      • Unit - Order SHOCKL_UNIT[0] to Stop
      • Unit - Make SHOCKL_UNIT[0] face SHOCKL_POINT[1] over 0.00 seconds
      • Custom script: call RemoveLocation( udg_SHOCKL_POINT[0] )
      • Custom script: call RemoveLocation( udg_SHOCKL_POINT[1] )
Added the function to move while channeling.
Spell is based on bear form now.
Contents

Shock Lance (Map)

Reviews
KILLCIDE
Needs Fixed Instances are not properly deallocated when the caster runs out of mana. Using the spell again will just leave the lightning effect in the map without getting destroyed Please put what the values you are saving in child keys represent...
Level 5
Joined
May 2, 2015
Messages
109
I like the concept!
But this spell would be much better if you give more control to it, likes-
  • add the ability to stop casting
  • add the ability to move the caster while casting. Set movespeed to something like 180-240
I think its better if you increase the cast range into 1000-1500.

Edit: I saw DestroyEffectBJ in your code. Why use BJ while DestroyEffect exist?
 
Last edited:
Level 11
Joined
May 16, 2016
Messages
730
Edit: I saw
DestroyEffectBJ
in your code. Why use BJ while
DestroyEffect
exist?
Idk Tank Commander adviced to do that.
I think its better if you increase the cast range into 1000-1500.
It belongs to a player choise. This is just a template you can edit parameters.
  • add the ability to stop casting
  • add the ability to move the caster while casting. Set movespeed to something like 180-240
I'll see. Probably I have to use Defend ability.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485

Needs Fixed

  • Instances are not properly deallocated when the caster runs out of mana. Using the spell again will just leave the lightning effect in the map without getting destroyed
  • Please put what the values you are saving in child keys represent. With that in mind, this code could really use some documentation
  • The loop shouldn't always be on
  • Please read the Spell Submission Rules &

Suggestions

  • Read the Spell Submission Rules & GPAG before submitting a resource
  • Unit groups are empty when they are created by the map. There is no need to "remove all units" from them
  • Go in more detail what the SHOCKL_IMMOBLISE variable does
  • The conditions in SHOCKL USE can be combined under one block
  • The order id used for the spell should be configurable
  • GetHandleIdBJ() -> GetHandleId()
  • LoadLightningHandleBJ() -> LoadLightningHandle()
  • DestroyLightningBJ() -> DestroyLightning()
  • The Lightning Type should be configurable
  • This spell does not have support for casters that have height
  • Loop timer should be configurable
  • Instead of using CountUnitsInGroup() every callback, just use an integer counter that you increment whenever you add a unit to the group and decrement when you remove them
  • GetUnitsInRangeOfLocAll() has a reference leak that cannot be removed if you use the GUI function
  • (Matching unit) is really ugly when you are filtering units. Please take a look at Convenient Unit Group Filtering in GUI
  • DestroyEffectBJ() -> DestroyEffect()
  • The effect you create and it's attachment point when you dakmage unit should be configurable

Status

Awaiting Update
 
Top