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

Electric Conduit v2.01

Spell Preview

Spell Description

Requirements

EC_GIF.jpg
EC_ICON.jpg
Electric Conduit
The caster will begin to channel a lightning orb, instantly
knocking units away and dealing damage. During the duration
of the channel, the orb will emit lightning strikes that will
bounce off units. The caster will continue to knockback enemy
units that come close.​

Triggers

How to Install

Credits

Changelog

  • EC Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- !! CONFIG START !! --------
      • -------- Abilities & Dummy --------
      • -------- NOTE: If you want to change the looping sfx, refer to this ability --------
      • Set EC_Ability = Electric Conduit
      • -------- Order ID for EC_Ability --------
      • Set EC_Order_ID = channel
      • -------- Chain Lightning Ability --------
      • -------- NOTE: If you want to edit anything about Chain Lightning (excluding intervals & instance per interval), refer to this ability --------
      • Set EC_AbilityCL = Electric Conduit (Chain Lightning)
      • -------- Dummy Unit --------
      • Set EC_Dummy = Dummy
      • -------- --------
      • -------- Special Effect for Overhead --------
      • Set EC_SFXOverhead = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • -------- Size of SFXOverhead --------
      • Set EC_SFXSize = 2.00
      • -------- Height of SFXOverHead --------
      • Set EC_SFXHeight = 325.00
      • -------- --------
      • -------- Duration of Spell Per Level --------
      • -------- NOTE: Make sure to match the Follow Through Time values in EC_Ability --------
      • Set EC_Duration[1] = 8.00
      • Set EC_Duration[2] = 10.00
      • Set EC_Duration[3] = 12.00
      • -------- Special Effect for Start of Channel --------
      • Set EC_SFXStart = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • -------- Special Effect on Caster for Duration of Spell --------
      • Set EC_SFXCaster = Abilities\Spells\Orc\LightningShield\LightningShieldTarget.mdl
      • -------- Attachment Point for SFXCaster --------
      • Set EC_Attach_SFXCaster = origin
      • -------- --------
      • -------- Instant Damage Dealt Per Level --------
      • Set EC_Damage[1] = 100.00
      • Set EC_Damage[2] = 150.00
      • Set EC_Damage[3] = 200.00
      • -------- --------
      • -------- Radius to Check for Chain Lightning Targets --------
      • Set EC_CLAoE = 600.00
      • -------- How Often to Cast Chain Lightning in Seconds --------
      • Set EC_CLInterval = 1.00
      • -------- Number of Chain Lightnings Casted at Each Interval --------
      • Set EC_CLAmount[1] = 3
      • Set EC_CLAmount[2] = 4
      • Set EC_CLAmount[3] = 5
      • -------- --------
      • -------- Knockback Stuff --------
      • Set EC_KBDistance = 400.00
      • Set EC_KBAoE = 200.00
      • Set EC_KBTime = 0.80
      • Set EC_KBSFX = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
      • -------- --------
      • -------- Other Damage Configurables --------
      • Set EC_AttackType = Spells
      • Set EC_DamageType = Normal
      • -------- !! CONFIG END !! --------
      • -------- --------
      • Set EC_PeriodicTimer = 0.03
      • Trigger - Add to EC Loop <gen> the event (Time - Every EC_PeriodicTimer seconds of game time)
      • Set EC_TempLoc = (Center of (Playable map area))
      • Unit - Create 1 EC_Dummy for Neutral Passive at EC_TempLoc facing Default building facing degrees
      • Set EC_TempUnit = (Last created unit)
      • Unit - Add EC_AbilityCL to EC_TempUnit
      • Unit - Remove EC_TempUnit from the game
      • Custom script: call RemoveLocation(udg_EC_TempLoc)
      • Set EC_SizeSFX = (100.00 x EC_SFXSize)

  • EC Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to EC_Ability
    • Actions
      • Set EC_SpellCount = (EC_SpellCount + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EC_SpellCount Equal to 1
        • Then - Actions
          • Trigger - Turn on EC Loop <gen>
        • Else - Actions
          • -------- loop is already on; do nothing --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EC_RecycledSize Equal to 0
        • Then - Actions
          • Set EC_IndexMax = (EC_IndexMax + 1)
          • Set EC_Spell_ID = EC_IndexMax
        • Else - Actions
          • Set EC_RecycledSize = (EC_RecycledSize - 1)
          • Set EC_Spell_ID = EC_RecycledStack[EC_RecycledSize]
      • Set EC_NodeNext[EC_Spell_ID] = 0
      • Set EC_NodeNext[EC_NodePrev[0]] = EC_Spell_ID
      • Set EC_NodePrev[EC_Spell_ID] = EC_NodePrev[0]
      • Set EC_NodePrev[0] = EC_Spell_ID
      • -------- --------
      • Set EC_Caster[EC_Spell_ID] = (Triggering unit)
      • Set EC_Owner[EC_Spell_ID] = (Triggering player)
      • Set EC_AbilityLvl[EC_Spell_ID] = (Level of EC_Ability for EC_Caster[EC_Spell_ID])
      • Set EC_CasterLoc[EC_Spell_ID] = (Position of EC_Caster[EC_Spell_ID])
      • Set EC_CLCounter[EC_Spell_ID] = 0.00
      • Set EC_CounterDuration[EC_Spell_ID] = 0.00
      • -------- --------
      • Special Effect - Create a special effect at EC_CasterLoc[EC_Spell_ID] using EC_SFXStart
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the EC_Attach_SFXCaster of EC_Caster[EC_Spell_ID] using EC_SFXCaster
      • Set EC_SFX_Loop[EC_Spell_ID] = (Last created special effect)
      • Unit - Create 1 EC_Dummy for EC_Owner[EC_Spell_ID] at EC_CasterLoc[EC_Spell_ID] facing Default building facing degrees
      • Set EC_Effect[EC_Spell_ID] = (Last created unit)
      • Animation - Change EC_Effect[EC_Spell_ID] flying height to EC_SFXHeight at 0.00
      • Animation - Change EC_Effect[EC_Spell_ID]'s size to (EC_SizeSFX%, EC_SizeSFX%, EC_SizeSFX%) of its original size
      • Special Effect - Create a special effect attached to the origin of EC_Effect[EC_Spell_ID] using EC_SFXOverhead
      • Set EC_SFX[EC_Spell_ID] = (Last created special effect)
      • -------- --------
      • -------- dealing damage to units next to caster --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within EC_KBAoE of EC_CasterLoc[EC_Spell_ID]) and do (Actions)
        • Loop - Actions
          • Set EC_TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (EC_TempUnit is A structure) Equal to False
              • (EC_TempUnit is Magic Immune) Equal to False
              • (EC_TempUnit is alive) Equal to True
              • (EC_TempUnit belongs to an enemy of EC_Owner[EC_Spell_ID]) Equal to True
            • Then - Actions
              • Unit - Cause EC_Caster[EC_Spell_ID] to damage EC_TempUnit, dealing EC_Damage[EC_AbilityLvl[EC_Spell_ID]] damage of attack type EC_AttackType and damage type EC_DamageType
            • Else - Actions
              • -------- TempUnit did not pass filters; do not deal damage to them --------
  • EC Loop
    • Events
    • Conditions
    • Actions
      • Set EC_Spell_ID = 0
      • For each (Integer EC_LoopInt) from 1 to EC_SpellCount, do (Actions)
        • Loop - Actions
          • Set EC_Spell_ID = EC_NodeNext[EC_Spell_ID]
          • Set EC_CounterDuration[EC_Spell_ID] = (EC_CounterDuration[EC_Spell_ID] + EC_PeriodicTimer)
          • -------- checking if the caster has died, interrupted channeling, or if the spell instance is over --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (EC_Caster[EC_Spell_ID] is dead) Equal to True
                  • (Current order of EC_Caster[EC_Spell_ID]) Not equal to (Order(EC_Order_ID))
                  • EC_CounterDuration[EC_Spell_ID] Greater than or equal to EC_Duration[EC_AbilityLvl[EC_Spell_ID]]
            • Then - Actions
              • Custom script: call RemoveLocation(udg_EC_CasterLoc[udg_EC_Spell_ID])
              • Special Effect - Destroy EC_SFX[EC_Spell_ID]
              • Special Effect - Destroy EC_SFX_Loop[EC_Spell_ID]
              • Unit - Remove EC_Effect[EC_Spell_ID] from the game
              • -------- --------
              • Set EC_RecycledStack[EC_RecycledSize] = EC_Spell_ID
              • Set EC_RecycledSize = (EC_RecycledSize + 1)
              • Set EC_NodeNext[EC_NodePrev[EC_Spell_ID]] = EC_NodeNext[EC_Spell_ID]
              • Set EC_NodePrev[EC_NodeNext[EC_Spell_ID]] = EC_NodePrev[EC_Spell_ID]
              • -------- --------
              • Set EC_SpellCount = (EC_SpellCount - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EC_SpellCount Equal to 0
                • Then - Actions
                  • Trigger - Turn off EC Loop <gen>
                • Else - Actions
                  • -------- there is still a spell instance running; do not turn loop off --------
            • Else - Actions
              • Set EC_CLCounter[EC_Spell_ID] = (EC_CLCounter[EC_Spell_ID] + EC_PeriodicTimer)
              • -------- applying knockback --------
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within EC_KBAoE of EC_CasterLoc[EC_Spell_ID]) and do (Actions)
                • Loop - Actions
                  • Set EC_TempUnit = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (EC_TempUnit is A structure) Equal to False
                      • (EC_TempUnit is Magic Immune) Equal to False
                      • (EC_TempUnit is alive) Equal to True
                      • (EC_TempUnit belongs to an enemy of EC_Owner[EC_Spell_ID]) Equal to True
                    • Then - Actions
                      • Set EC_TempLoc = (Position of EC_TempUnit)
                      • Set Knockback2DAngle = (Angle from EC_CasterLoc[EC_Spell_ID] to EC_TempLoc)
                      • Set Knockback2DTime = EC_KBTime
                      • Set Knockback2DDistance = EC_KBDistance
                      • Set Knockback2DUnit = EC_TempUnit
                      • Set Knockback2DLoopFX = EC_KBSFX
                      • Trigger - Run Knockback 2D <gen> (checking conditions)
                      • Custom script: call RemoveLocation(udg_EC_TempLoc)
                    • Else - Actions
                      • -------- TempUnit did not pass filters; do not apply knockback --------
              • -------- checking if the interval to cast chain lightning has been met --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EC_CLCounter[EC_Spell_ID] Greater than or equal to EC_CLInterval
                • Then - Actions
                  • Set EC_CLCounter[EC_Spell_ID] = 0.00
                  • Set EC_CLGroup = (Units within EC_CLAoE of EC_CasterLoc[EC_Spell_ID])
                  • -------- filtering out units to target for chain lightning --------
                  • Unit Group - Pick every unit in EC_CLGroup and do (Actions)
                    • Loop - Actions
                      • Set EC_TempUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Or - Any (Conditions) are true
                            • Conditions
                              • (EC_TempUnit is A structure) Equal to True
                              • (EC_TempUnit is Magic Immune) Equal to True
                              • (EC_TempUnit is dead) Equal to True
                              • (EC_TempUnit belongs to an ally of EC_Owner[EC_Spell_ID]) Equal to True
                        • Then - Actions
                          • Unit Group - Remove EC_TempUnit from EC_CLGroup
                        • Else - Actions
                          • -------- TempUnit did not pass filters; do not remove them from group --------
                  • -------- select CLAmount random targets from area and cast chain lightning on them --------
                  • Set EC_Targets = (Random EC_CLAmount[EC_AbilityLvl[EC_Spell_ID]] units from EC_CLGroup)
                  • Unit Group - Pick every unit in EC_Targets and do (Actions)
                    • Loop - Actions
                      • Set EC_TempUnit = (Picked unit)
                      • Unit - Create 1 EC_Dummy for EC_Owner[EC_Spell_ID] at EC_CasterLoc[EC_Spell_ID] facing Default building facing degrees
                      • Set EC_DummyUnit = (Last created unit)
                      • Unit - Add a 1.00 second Generic expiration timer to EC_DummyUnit
                      • Animation - Change EC_DummyUnit flying height to EC_SFXHeight at 0.00
                      • Unit - Add EC_AbilityCL to EC_DummyUnit
                      • Unit - Set level of EC_AbilityCL for EC_DummyUnit to EC_AbilityLvl[EC_Spell_ID]
                      • Unit - Order EC_DummyUnit to Orc Far Seer - Chain Lightning EC_TempUnit
                  • Custom script: call DestroyGroup(udg_EC_Targets)
                  • Custom script: call DestroyGroup(udg_EC_CLGroup)
                • Else - Actions
                  • -------- it is not time to cast chain lightning; do nothing --------
  1. Under Preferences, make sure you have "Automatically create
    unknown variables while pasting trigger data" checked

  2. Import dummy.mdx, then copy and paste the dummy unit and
    two custom abilities into your map
    NOTE: If you already have dummy.mdx imported into your
    map, you DO NOT have to reimport it
    If you already have a global dummy unit in your
    map, you can skip this step

  3. Copy and paste the Resources folder into your map
    NOTE: If you already have a resource in the Resources folder
    imported into your map, you DO NOT have to reimport it

  4. Copy and paste the Electric Conduit folder into your map

  5. Go to the EC Config trigger, and change the Ability, AbilityCL, &
    Dummy variables to the corresponding objects you just imported
User
Bribe - GUI Knockback 2D & GUI Unit Indexer
Vexorian - dummy.mdx
[TD]

v2.01 (March 07, 2016)

  • Added an optional Electric Conduit folder that is integrated with GUI Spell System
  • Added Bribe's new knockback system update
  • Removed unnecesary NodeLast[] variable for linked list; last spell instance now stores into NodePrev[0]
  • Removed If/Then/Else that would set NodeLast = NodePrev[Spell_ID] if NodeLast == Spell_ID
v2.00 (January 20, 2016)

  • Added Bribe's new knockback system update
  • Changed data structure to linked listing
v1.05 (December 02, 2015)
  • Added Bribe's new knockback system update
  • Changed loop to check if it is time to deindex before starting
  • Changed name of EC Init to EC Cast
  • Fixed Owner[] variable to now use Triggering Player instead of Owner of (Unit)
  • Removed unnecessary function call when turning of EC Loop (Turn off (This Trigger) -> (Turn off EC Loop))
v1.04 (November 14, 2015)
  • Added Bribe's new knockback system update
  • Fixed a small bug where the caster would still continue to channel the spell even though they are stunned/silenced
  • Removed the "unable to move or act" mechanic; caster can now move to interrupt the spell
v1.03 (October 30, 2015)
  • Changed names of some variables
  • Removed unneccesary variables
v1.02 (September 20, 2015)
  • Added a configurable for changing the overhead SFX
  • Added preload functions; users no longer have to worry about making sure dummy unit has correct spell
  • Removed Electric Conduit Dummy 2; spell now only uses one dummy for everything
  • Removed KillUnit function and replaced it with RemoveUnit
  • Removed EC Dummy Cleaner trigger
v1.01 (September 17, 2015)
  • Added a check for the possibility of the caster being interrupted during channel
    (death, silenced, or stunned)
  • Removed use of expiration timer for SFX dummy, uses Kill unit instead
v1.00 (September 14, 2015)
  • Uploaded

Keywords:
electric, conduit, shaman, chain, lightning, thunder, channel, knockback, explode, explosion, blue, channel, linked, listing, gui, mui, killcide
Contents

Electric Conduit v2.01 (Map)

Reviews
11:14, 20th Sep 2015 Bribe: A rush of eye-candy. A powerful spell that would make for a great ultimate or boss ability.
Level 37
Joined
Jul 22, 2015
Messages
3,485
Updated to v2.01:
  • Added an optional Electric Conduit folder that is integrated with GUI Spell System
  • Added Bribe's new knockback system update
  • Removed unnecesary NodeLast[] variable for linked list; last spell instance now stores into NodePrev[0]
  • Removed If/Then/Else that would set NodeLast = NodePrev[Spell_ID] if NodeLast == Spell_ID


Looks real good!

Hey! Glad you liked it :D
 
Top