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

Destructive Lightning

--Destructive Lightning--
The hero creates electric sphere in target point. The sphere increases energy in a current of 1 second then throws out a powerful electric charge on all enemies around. In each enemy on distance of 600 points will be hited by Chain Lightning, that bounces on a random enemy unit within 300 point up to 10 times. Damage icreases per bounce.
Level 1 - 30 initial damage, +10% damage per bounce.
Level 2 - 50 initial damage, +20% damage per bounce.
Level 3 - 70 initial damage, +30% damage per bounce.
  • Destructive Lightning A
    • События
      • Боевая единица - A unit РџСЂРёРІРѕРґРёС‚ способность РІ действие
    • Условия
      • (Ability being cast) равно Destructive Lightning
    • Действия
      • -------- If DL_Switch = 0, it means ability is not used, we must turn on trigger B --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Если - Условия
          • DL_Switch равно 0
        • РўРѕ - Действия
          • Триггер - Turn on Destructive Lightning B <gen>
        • Р&#152;наче - Действия
      • -------- Increasing DL_Switch, displays that ability is used --------
      • Set DL_Switch = (DL_Switch + 1)
      • -------- Increasing DL_CastNumber, it means one more unit become using ability --------
      • Set DL_CastNumber = (DL_CastNumber + 1)
      • -------- Displays - used ability or not --------
      • Set DL_Off[DL_CastNumber] = Да
      • -------- This must be 0.00 for correct working of trigger B --------
      • Set DL_Time[DL_CastNumber] = 0.00
      • -------- Let's establish caster and target point --------
      • Set DL_Caster[DL_CastNumber] = (Casting unit)
      • Set DL_Point[0] = (Target point of ability being cast)
      • -------- Creating Effect --------
      • Боевая единица - Create 1 Effect: Lighting Orb for (Owner of DL_Caster[DL_CastNumber]) at DL_Point[0] facing Стандартная ориентация зданий degrees
      • Set DL_Orb[DL_CastNumber] = (Last created unit)
      • -------- Removing location to avoid leaks --------
      • Custom script: call RemoveLocation (udg_DL_Point[0])
  • Destructive Lightning B
    • События
      • Время - Every 0.02 seconds of game time
    • Условия
    • Действия
      • -------- We use variable DL instead of Integer A --------
      • For each (Integer DL) from 1 to DL_CastNumber, do (Actions)
        • Цикл - Действия
          • -------- If DL_Off = True, then runs following actions --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Если - Условия
              • DL_Off[DL] равно Да
            • РўРѕ - Действия
              • -------- We adding 0.02 to DL_Time because trigger runs every 0.02 seconds --------
              • Set DL_Time[DL] = (DL_Time[DL] + 0.02)
              • -------- Increasing Effect's size for more visual effects --------
              • Анимация - Change DL_Orb[DL]'s size to ((100.00 + (500.00 x DL_Time[DL]))%, (100.00 + (500.00 x DL_Time[DL]))%, (100.00 + (500.00 x DL_Time[DL]))%) of its original size
              • -------- If DL_Time = 1.00, it mean 1 second expired from cast moment --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Если - Условия
                  • DL_Time[DL] больше или равно 1.00
                • РўРѕ - Действия
                  • -------- Let's establish position of Effect --------
                  • Set DL_Point[1] = (Position of DL_Orb[DL])
                  • -------- Let's establish our enemies --------
                  • Set DL_Group[0] = (Units within 600.00 of DL_Point[1] matching ((((((Matching unit) is Здание) равно Нет) and (((Matching unit) is Невосприимчивость Рє магии) равно Нет)) and (((Matching unit) is dead) равно Нет)) and (((Matc
                  • Отряд - Pick every unit in DL_Group[0] and do (Actions)
                    • Цикл - Действия
                      • -------- Let's store our enemies in variable --------
                      • Set DL_Targets[DL] = (Picked unit)
                      • -------- Let's establish their position --------
                      • Set DL_Point[2] = (Position of DL_Targets[DL])
                      • -------- Let's create another effect for each enemy at their position --------
                      • Боевая единица - Create 1 Effect: Lighting Caster for (Owner of DL_Caster[DL]) at DL_Point[2] facing Стандартная ориентация зданий degrees
                      • -------- storing position of Effect2 in variable --------
                      • Set DL_Point[3] = (Position of (Last created unit))
                      • -------- Adding Chain Lightning ability to Effect2 --------
                      • Боевая единица - Add Chain Lightning DUMMIE to (Last created unit)
                      • Боевая единица - Set level of Chain Lightning DUMMIE for (Last created unit) to (Level of Destructive Lightning for DL_Caster[DL])
                      • -------- Let's establish single enemy within position of each Effect2 --------
                      • Set DL_Group[1] = (Units within 200.00 of DL_Point[3] matching ((((((Matching unit) is Здание) равно Нет) and (((Matching unit) is Невосприимчивость Рє магии) равно Нет)) and (((Matching unit) is dead) равно Нет)) and (((Matc
                      • Set DL_TargetSingle[DL] = (Random unit from DL_Group[1])
                      • -------- Moving Effect2 to position of Effect (lightning orb) --------
                      • Боевая единица - Move (Last created unit) instantly to DL_Point[1]
                      • -------- Issues ecah Effect2 to cast chain lightning in it's single target --------
                      • Боевая единица - Order (Last created unit) to Говорящий СЃ Духами (РћСЂРґР°) - Цепь молний DL_TargetSingle[DL]
                      • Боевая единица - Add a 1.00 second Общий expiration timer to (Last created unit)
                      • -------- get rid from locations and group to avoid leaks --------
                      • Custom script: call RemoveLocation (udg_DL_Point[2])
                      • Custom script: call RemoveLocation (udg_DL_Point[3])
                      • Custom script: call DestroyGroup (udg_DL_Group[1])
                  • -------- get rid from Effect --------
                  • Боевая единица - Add a 0.40 second Общий expiration timer to DL_Orb[DL]
                  • Анимация - Change DL_Orb[DL]'s animation speed to 30.00% of its original speed
                  • -------- Let's establish DL_Off = False, it means unit finished ability --------
                  • Set DL_Off[DL] = Нет
                  • -------- Let's reduce DL_Switch on 1, it means that 1 unit less using ability --------
                  • Set DL_Switch = (DL_Switch - 1)
                  • -------- If DL_Switch = 0 it means no units are using ability, we can reset indexes and turn off trigger B --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Если - Условия
                      • DL_Switch равно 0
                    • РўРѕ - Действия
                      • Set DL_CastNumber = 0
                      • Триггер - Turn off (This trigger)
                    • Р&#152;наче - Действия
                  • -------- removing location ang group to avoid leak --------
                  • Custom script: call RemoveLocation (udg_DL_Point[1])
                  • Custom script: call DestroyGroup (udg_DL_Group[0])
                • Р&#152;наче - Действия
            • Р&#152;наче - Действия
MUI, Works, Leakless.

Keywords:
Destruction, Lightning, Chain Lightning
Contents

Light (Map)

Reviews
09:35, 10th Mar 2010 The_Reborn_Devil: The triggering looks ok and there were no leaks. Status: Approved Rating: Useful

Moderator

M

Moderator

09:35, 10th Mar 2010
The_Reborn_Devil:
The triggering looks ok and there were no leaks.


Status: Approved
Rating: Useful
 
Level 12
Joined
May 21, 2009
Messages
994
Here is english triggers.
  • Destructive Lightning A
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Destructive Lightning
    • Actions
      • -------- If DL_Switch = 0, it means ability is not used, we must turn on trigger B --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DL_Switch Equal to 0
        • Then - Actions
          • Trigger - Turn on Destructive Lightning B <gen>
        • Else - Actions
      • -------- Increasing DL_Switch, displays that ability is used --------
      • Set DL_Switch = (DL_Switch + 1)
      • -------- Increasing DL_CastNumber, it means one more unit become using ability --------
      • Set DL_CastNumber = (DL_CastNumber + 1)
      • -------- Displays - used ability or not --------
      • Set DL_Off[DL_CastNumber] = True
      • -------- This must be 0.00 for correct working of trigger B --------
      • Set DL_Time[DL_CastNumber] = 0.00
      • -------- Let's establish caster and target point --------
      • Set DL_Caster[DL_CastNumber] = (Casting unit)
      • Set DL_Point[0] = (Target point of ability being cast)
      • -------- Creating Effect --------
      • Unit - Create 1 Effect: Lighting Orb for (Owner of DL_Caster[DL_CastNumber]) at DL_Point[0] facing Default building facing degrees
      • Set DL_Orb[DL_CastNumber] = (Last created unit)
      • -------- Removing location to avoid leaks --------
      • Custom script: call RemoveLocation (udg_DL_Point[0])
  • Destructive Lightning B
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • -------- We use variable DL instead of Integer A --------
      • For each (Integer DL) from 1 to DL_CastNumber, do (Actions)
        • Loop - Actions
          • -------- If DL_Off = True, then runs following actions --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DL_Off[DL] Equal to True
            • Then - Actions
              • -------- We adding 0.02 to DL_Time because trigger runs every 0.02 seconds --------
              • Set DL_Time[DL] = (DL_Time[DL] + 0.02)
              • -------- Increasing Effect's size for more visual effects --------
              • Animation - Change DL_Orb[DL]'s size to ((100.00 + (500.00 x DL_Time[DL]))%, (100.00 + (500.00 x DL_Time[DL]))%, (100.00 + (500.00 x DL_Time[DL]))%) of its original size
              • -------- If DL_Time = 1.00, it mean 1 second expired from cast moment --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DL_Time[DL] Greater than or equal to 1.00
                • Then - Actions
                  • -------- Let's establish position of Effect --------
                  • Set DL_Point[1] = (Position of DL_Orb[DL])
                  • -------- Let's establish our enemies --------
                  • Set DL_Group = (Units within 600.00 of DL_Point[1] matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) is dead) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of DL
                  • Unit Group - Pick every unit in DL_Group and do (Actions)
                    • Loop - Actions
                      • -------- Let's store our enemies in variable --------
                      • Set DL_Targets[DL] = (Picked unit)
                      • -------- Let's establish their position --------
                      • Set DL_Point[2] = (Position of DL_Targets[DL])
                      • -------- Let's create another effect for each enemy at their position --------
                      • Unit - Create 1 Effect: Lighting Caster for (Owner of DL_Caster[DL]) at DL_Point[2] facing Default building facing degrees
                      • -------- storing position of Effect2 in variable --------
                      • Set DL_Point[3] = (Position of (Last created unit))
                      • -------- Adding Chain Lightning ability to Effect2 --------
                      • Unit - Add Chain Lightning DUMMIE to (Last created unit)
                      • Unit - Set level of Chain Lightning DUMMIE for (Last created unit) to (Level of Destructive Lightning for DL_Caster[DL])
                      • -------- Let's establish single enemy within position of each Effect2 --------
                      • Set DL_TargetSingle[DL] = (Random unit from (Units within 200.00 of DL_Point[3] matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) is dead) Equal to False)) and (((Matching unit) belongs to an ene
                      • -------- Moving Effect2 to position of Effect (lightning orb) --------
                      • Unit - Move (Last created unit) instantly to DL_Point[1]
                      • -------- Issues ecah Effect2 to cast chain lightning in it's single target --------
                      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning DL_TargetSingle[DL]
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • -------- get rid from locations and group to avoid leaks --------
                      • Custom script: call RemoveLocation (udg_DL_Point[2])
                      • Custom script: call RemoveLocation (udg_DL_Point[3])
                      • Custom script: call DestroyGroup (udg_DL_Group)
                  • -------- get rid from Effect --------
                  • Unit - Add a 0.40 second Generic expiration timer to DL_Orb[DL]
                  • Animation - Change DL_Orb[DL]'s animation speed to 30.00% of its original speed
                  • -------- Let's establish DL_Off = False, it means unit finished ability --------
                  • Set DL_Off[DL] = False
                  • -------- Let's reduce DL_Switch on 1, it means that 1 unit less using ability --------
                  • Set DL_Switch = (DL_Switch - 1)
                  • -------- If DL_Switch = 0 it means no units are using ability, we can reset indexes and turn off trigger B --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DL_Switch Equal to 0
                    • Then - Actions
                      • Set DL_CastNumber = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                  • -------- removing location to avoid leak --------
                  • Custom script: call RemoveLocation (udg_DL_Point[1])
                • Else - Actions
            • Else - Actions
 
Level 3
Joined
Apr 28, 2009
Messages
44
mmmm, still on a rampaging?? :p
i like this spell more than the other spells
it looks leakless to me...

@maker

why: leaks a unit group??
 
Top