Electrified Wisps v1.11

  • Like
Reactions: Vinz
Summons 5 Electrified Wisps around the caster which follow him while spinning and damaging nearby units. Speed gets diminished with every level to increase efficiency. Damage - 10/15/20
Damage AoE - 200/250/300
Damage interval - 0.03s
Duration - 5/8/11 seconds
Death damage - 50/75/100
Death AoE - 300/350/400
Cooldown - 5 seconds

  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Your ability --------
      • Set EW_Ability = Electrified Wisps
      • -------- Model of the dummy --------
      • Set EW_Model = Ball Dummy
      • -------- Duration of each wisp --------
      • Set EW_CDuration[1] = 5.00
      • Set EW_CDuration[2] = 8.00
      • Set EW_CDuration[3] = 11.00
      • -------- Number of wisps created --------
      • Set EW_BallCount = 5
      • -------- Wisp damage AoE --------
      • Set EW_DamageAoE[1] = 150.00
      • Set EW_DamageAoE[2] = 175.00
      • Set EW_DamageAoE[3] = 200.00
      • -------- Damage Interval (cannot go lower than 0.03s) --------
      • Set EW_DamageInterval = 0.03
      • -------- Wisp damage per second (described in the first part of the arithmetic function) --------
      • Set EW_Damage[1] = (100.00 x EW_DamageInterval)
      • Set EW_Damage[2] = (150.00 x EW_DamageInterval)
      • Set EW_Damage[3] = (200.00 x EW_DamageInterval)
      • -------- Wisp damage attack and damage types --------
      • Set EW_AType = Spells
      • Set EW_DType = Normal
      • -------- Wisp damage effect --------
      • Set EW_DamageSFX = Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
      • -------- The form(effect) of the lightning --------
      • Set EW_LightningEffect = Finger of Death
      • -------- Lightning Color (1Red/2Green/3Blue) and Alpha(4) --------
      • Set EW_LightningColor[1] = 0.00
      • Set EW_LightningColor[2] = 1.00
      • Set EW_LightningColor[3] = 1.00
      • Set EW_LightningColor[4] = 1.00
      • -------- Created wisp formation (circle is default) --------
      • Set EW_Formation = (360.00 / (Real(EW_BallCount)))
      • -------- Distance between offset location and wisp locations --------
      • Set EW_OffsetDistance[1] = 500.00
      • Set EW_OffsetDistance[2] = 600.00
      • Set EW_OffsetDistance[3] = 700.00
      • -------- Speed (described in the first of the arithmetic function) --------
      • Set EW_Speed[1] = (200.00 x 0.03)
      • Set EW_Speed[2] = (150.00 x 0.03)
      • Set EW_Speed[3] = (100.00 x 0.03)
      • -------- Wisp death damage --------
      • Set EW_DeathDamage[1] = 50.00
      • Set EW_DeathDamage[2] = 75.00
      • Set EW_DeathDamage[3] = 100.00
      • -------- Wisp death damage AoE --------
      • Set EW_DeathAoE[1] = 300.00
      • Set EW_DeathAoE[2] = 350.00
      • Set EW_DeathAoE[3] = 400.00
      • -------- Special effect for wisp death --------
      • Set EW_BallDeathSpecialEf = Units\NightElf\Wisp\WispExplode.mdl
      • -------- Wisp death attack and damage types --------
      • Set EW_AType = Spells
      • Set EW_DType = Normal
  • Electrified Wisps
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to EW_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EW_MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn on Electrified Wisps Loop <gen>
        • Else - Actions
      • For each (Integer EW_TempIndex) from 1 to EW_BallCount, do (Actions)
        • Loop - Actions
          • Set EW_MaxIndex = (EW_MaxIndex + 1)
          • Set EW_Caster[EW_MaxIndex] = (Triggering unit)
          • Set EW_AbilityLevel[EW_MaxIndex] = (Level of EW_Ability for EW_Caster[EW_MaxIndex])
          • Set EW_Duration[EW_MaxIndex] = EW_CDuration[EW_AbilityLevel[EW_MaxIndex]]
          • Set EW_SecondDuration[EW_MaxIndex] = 0.00
          • Set EW_Player[EW_MaxIndex] = (Triggering player)
          • Set EW_TempPoint2 = (Position of EW_Caster[EW_MaxIndex])
          • Set EW_TempReal = (EW_Formation x (Real(EW_MaxIndex)))
          • Set EW_BallDegree[EW_MaxIndex] = EW_TempReal
          • Set EW_TempPoint = (EW_TempPoint2 offset by EW_OffsetDistance[EW_AbilityLevel[EW_MaxIndex]] towards EW_BallDegree[EW_MaxIndex] degrees)
          • Unit - Create 1 EW_Model for EW_Player[EW_MaxIndex] at EW_TempPoint facing EW_BallDegree[EW_MaxIndex] degrees
          • Lightning - Create a EW_LightningEffect lightning effect from source EW_TempPoint2 to target EW_TempPoint
          • Set EW_Lightning[EW_MaxIndex] = (Last created lightning effect)
          • Lightning - Change color of EW_Lightning[EW_MaxIndex] to (EW_LightningColor[1] EW_LightningColor[2] EW_LightningColor[3]) with EW_LightningColor[4] alpha
          • Set EW_Ball[EW_MaxIndex] = (Last created unit)
          • Custom script: call RemoveLocation(udg_EW_TempPoint)
          • Custom script: call RemoveLocation(udg_EW_TempPoint2)
  • Electrified Wisps Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer EW_TempIndex) from 1 to EW_MaxIndex, do (Actions)
        • Loop - Actions
          • Set EW_Duration[EW_TempIndex] = (EW_Duration[EW_TempIndex] - 0.03)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EW_Duration[EW_TempIndex] Greater than or equal to 0.00
              • (EW_Caster[EW_TempIndex] is alive) Equal to True
            • Then - Actions
              • Set EW_TempPoint = (Position of EW_Caster[EW_TempIndex])
              • Set EW_BallDegree[EW_TempIndex] = (EW_BallDegree[EW_TempIndex] - EW_Speed[EW_AbilityLevel[EW_TempIndex]])
              • Set EW_TempPoint2 = (EW_TempPoint offset by EW_OffsetDistance[EW_AbilityLevel[EW_TempIndex]] towards EW_BallDegree[EW_TempIndex] degrees)
              • Lightning - Move EW_Lightning[EW_TempIndex] to source EW_TempPoint and target EW_TempPoint2
              • Custom script: call RemoveLocation(udg_EW_TempPoint)
              • Unit - Move EW_Ball[EW_TempIndex] instantly to EW_TempPoint2, facing EW_BallDegree[EW_TempIndex] degrees
              • Set EW_SecondDuration[EW_TempIndex] = (EW_SecondDuration[EW_TempIndex] + 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EW_SecondDuration[EW_TempIndex] Greater than or equal to EW_DamageInterval
                • Then - Actions
                  • Set EW_SecondDuration[EW_TempIndex] = 0.00
                  • Set EW_TempGroup = (Units within EW_DamageAoE[EW_AbilityLevel[EW_TempIndex]] of EW_TempPoint2)
                  • Unit Group - Pick every unit in EW_TempGroup and do (Actions)
                    • Loop - Actions
                      • Set EW_PickedUnits = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (EW_PickedUnits is alive) Equal to True
                          • (EW_PickedUnits is A structure) Equal to False
                          • (EW_PickedUnits belongs to an ally of EW_Player[EW_TempIndex]) Equal to False
                        • Then - Actions
                        • Else - Actions
                          • Unit Group - Remove EW_PickedUnits from EW_TempGroup
                  • Set EW_RandomUnit = (Random unit from EW_TempGroup)
                  • Unit - Cause EW_Caster[EW_TempIndex] to damage EW_RandomUnit, dealing EW_Damage[EW_TempIndex] damage of attack type EW_AType and damage type EW_DType
                  • Special Effect - Create a special effect attached to the overhead of EW_RandomUnit using EW_DamageSFX
                  • Special Effect - Destroy (Last created special effect)
                  • Set EW_RandomUnit = No unit
                  • Custom script: call DestroyGroup(udg_EW_TempGroup)
                • Else - Actions
              • Custom script: call RemoveLocation(udg_EW_TempPoint2)
            • Else - Actions
              • Set EW_TempPoint = (Position of EW_Ball[EW_TempIndex])
              • Special Effect - Create a special effect at EW_TempPoint using EW_BallDeathSpecialEf
              • Special Effect - Destroy (Last created special effect)
              • Set EW_TempGroup = (Units within EW_DeathAoE[EW_AbilityLevel[EW_TempIndex]] of EW_TempPoint)
              • Unit Group - Pick every unit in EW_TempGroup and do (Actions)
                • Loop - Actions
                  • Set EW_PickedUnits = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (EW_PickedUnits belongs to an ally of EW_Player[EW_TempIndex]) Equal to False
                      • (EW_PickedUnits is A structure) Equal to False
                    • Then - Actions
                      • Unit - Cause EW_Caster[EW_TempIndex] to damage EW_PickedUnits, dealing EW_DeathDamage[EW_AbilityLevel[EW_TempIndex]] damage of attack type EW_AType and damage type EW_DType
                    • Else - Actions
              • Custom script: call DestroyGroup(udg_EW_TempGroup)
              • Custom script: call RemoveLocation(udg_EW_TempPoint)
              • Lightning - Destroy EW_Lightning[EW_TempIndex]
              • Set EW_Lightning[EW_TempIndex] = EW_Lightning[EW_MaxIndex]
              • Custom script: set udg_EW_Lightning[udg_EW_MaxIndex] = null
              • Unit - Remove EW_Ball[EW_TempIndex] from the game
              • Set EW_Ball[EW_TempIndex] = EW_Ball[EW_MaxIndex]
              • Set EW_AbilityLevel[EW_TempIndex] = EW_AbilityLevel[EW_MaxIndex]
              • Set EW_Duration[EW_TempIndex] = EW_Duration[EW_MaxIndex]
              • Set EW_SecondDuration[EW_TempIndex] = EW_SecondDuration[EW_MaxIndex]
              • Set EW_Player[EW_TempIndex] = EW_Player[EW_MaxIndex]
              • Set EW_BallDegree[EW_TempIndex] = EW_BallDegree[EW_MaxIndex]
              • Set EW_Caster[EW_TempIndex] = EW_Caster[EW_MaxIndex]
              • Set EW_MaxIndex = (EW_MaxIndex - 1)
              • Set EW_TempIndex = (EW_TempIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EW_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off Electrified Wisps Loop <gen>
                • Else - Actions

DracoL1ch (LoD developer) helped me with moving lightning effects.


v1.01 - Modified BallDeath trigger, added memory cleaners and stuff.
v1.02 - Actually imported the changes into hiveworkshop page (silly me).
v1.03 - Added more configuration, fixed some memory leaks.
v1.04 - Modified a lot of stuff that RetardedDreadlord pointed out (thanks) changed some special effects, changed Ball Phoenix Fire effect and missle speed, changed lightning effect.
v1.05 - Made the spell support multiple levels, the wisps are now rotating around the caster, merged death trigger with loops deindex part, added more configurations.
v1.06 - Added a deindex when the target is dead, damage is now level-dependant, simplified variable names and upgraded import instructions.
v1.07 - Added more love to the tooltip and loading screen, updated the speed configuration variable to be actual Warcraft 3 speed.
v1.08 - Replaced some functions with faster ones, merged the two speed variables into one, reconstructed the duration reduction to make more sense, added a preload to the added ability, removed a pointless condition when deciding if the death explosion should damage the unit or not. Huge thanks to KILLCIDE.
v1.09 - Removed the condition to move wisps, added a removal of wisps at the end of the spell rather than when the wisps' duration expires.
v1.10 - Triggered damage, added a damage interval/damage configurable variables.
v1.11 - Fixed leaked things, improved damage smoothness.


Keywords:
GUI, MUI, Beginner
Contents

Electrified Wisps v1.11 (Map)

Reviews
9th Jan.2016 IcemanBo: Simple concept and works fine. Useful. The lightning itself is not damaging, I would prefer to have them as optional. Simple rotating dummy units that are damaging without lightnings would be cool, for me personal, too...
Level 11
Joined
Jul 25, 2014
Messages
490
Well, firing a very fast missile wasn't exactly something I considered, I just used logical thinking because electricity is fast you know:D

I actually set the sight radius myself, for it to be a part of the spell, but idk, maybe i'll remove it. Score points?

You may have convinced me to trigger the damage but only because the dummies deal damage and not the caster himself. It's not some more lines of code, you have to actually get a unit group check all the conditions, if conditions aren't passed, remove the picked unit from the group, then setting a random unit and only then damaging. And I have to null it then since if the wisps go out of range, the last randomed unit will get damaged continuously until the spell ends.

Will update once I'll be up for it.

EDIT: Updated.
 
Last edited:
I recommend the damage to be dealt each 0.03 and, but calculated with damage/second for user config. (like with speed)
It is easier for user to handle and more accurate in result.

Dummies currently have 1000 Sight Radius in day.
So they extremly expand the unit's sight radius.
I don't think this is wanted. (?)


These are not deinxed at the moment:
  • Player
  • SecondDuration
 
Top