1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Let your favorite entries duke it out in the 15th Techtree Contest Poll.
    Dismiss Notice
  5. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Warcraft Arena 1.0 Intensive.w3x
Variables
Spells
Grim final
hokages
gates
Green Cero
Susanoo
Gran Ray Cero sound
Grimjow Cero
grimjow cero dust wave
gran ray cero animation
Sprenger
Soiton Waves
Kamui
Kamui EYE
Mokudon no jutsu
WEEEEEEEE
Summon dogs
Mugetsu
Stab
snake vomit
Edo tensei
Raikiri
triple doors
hokage revival
Sapok
Black Cero
Lanza
Enclose
FIREBALL
Rasengan
Killer bee transform
naruto spell
Fuuton Rasen Shuuriken
Senbornzakura
Bakudo 61
Tensa Zangetsu
Getsuga tenshou
Black Getsuga
Hado 91
Chidori
Senpuu Oodama Rasengan
Shunpo
Kyouka Suigetsu
Hado 33
Kage Bunshin
Shuukei
kirin
Bankai senbornzakura
Nagashi
fuuton 2
Kirin remove
sage fuuton
blasty
Gran Ray Cero 1
CERO GREEN
blasty Copy
blasty Copy Copy
Red cero
Grimjow Release
Bijuu Dama
rasen shurkien unit
rasenshurken unit 2
Bijuu Dama 2
kirin explosion
kirin explosion Copy
kirin explosion Copy 2
Black Cero effect
HADO EXPLODE
Cero Explode
Cero Explode Copy
kirin shake
rasenshuriken shake
lanza shake
Aizen HOLD
coms
order help
Com attacks
Player2
Player5
Starting
Map
region 15
MapMusic
Kakashi
Sasuke
Madara
Shingami
Orochimaru
Arthas
Demon Knight
Killer BEe
Ichigo
Marksman
Lion Rider
Enemies
Jungle 1
Jungle 2
Jungle 3
Jungle 4
Lord Guard Area
hero remove
remove wisp
hero choose
Hero
levelin 1
levelin 2
levelin 3
levelin 4
levelin 5
levelin 6
levelin 7
levelin 8
levelin 9
levelin 10
levelin 11
levelin11a
Allies
revive
revive Copy
revive Copy 2
revive Copy 3
Alliedvictory
WarningAllied
WarningAllied Copy
WarningAllied Copy Copy
Axis
revive Copy 5
revive Copy 5 Copy 4
revive Copy 5 Copy
revive Copy 5 Copy 2
AxisVictory
WarningAxis
WarningAxis Copy
WarningAxis Copy Copy
WarningAxis Copy Copy Copy
Boss
Resources
PurgeandFire's Check Walkability
Check Walkability Setup
Check Walkability
Bribe's Unit Indexer
Unit Indexer
Bribe's Knockback 2D
Knockback 2D Config
Knockback 2D Destroy
Knockback 2D
Knockback 2D System
K2D OnLoop Template
Meteor Strike
MS readme
MS Config
MS Cast
MS Loop

		
Name Type Is Array Initial Value
CenterPoint location No
CP_HiddenItems item Yes
CP_HiddenItemsIndex integer No
CP_Item item No
CP_Point location No
CP_PointIsWalkable boolean No
CP_Rect rect No
duelon integer No
g1 integer No
gate real Yes
IsUnitBeingKnockedBack boolean Yes
K2DAmphibious boolean Yes
K2DAngle real Yes
K2DBounce boolean Yes
K2DCollision real Yes
K2DCos real Yes
K2DCosD1 real Yes
K2DCosD2 real Yes
K2DCosH real Yes
K2DDebrisKiller unit No
K2DDestRadius real Yes
K2DDistanceLeft real Yes
K2DFlying boolean Yes
K2DFreeze boolean Yes
K2DFriction real Yes
K2DFXModel string Yes
K2DFXRate real Yes
K2DFXTimeLeft real Yes
K2DHeight real Yes
K2DHeightThreshold real Yes
K2DImpact trigger Yes
K2DItem item No
K2DItemOffset boolean No
K2DItemsFound boolean No
K2DKillTrees boolean Yes
K2DLastX real Yes
K2DLastY real Yes
K2DMaxDestRadius real No
K2DMaxX real No
K2DMaxY real No
K2DMinX real No
K2DMinY real No
K2DNext integer Yes
K2DOverride boolean Yes
K2DPause boolean Yes
K2DPrev integer Yes
K2DRadius integer Yes
K2DRegion rect No
K2DSimple boolean Yes
K2DSin real Yes
K2DSinD1 real Yes
K2DSinD2 real Yes
K2DSinH real Yes
K2DSource unit Yes
K2DTimeLeft real Yes
K2DTimeout real No
K2DTimer timer No
K2DUnbiasedCollision boolean Yes
K2DVelocity real Yes
K2DX real No
K2DY real No
Knockback2DAmphibious boolean No
Knockback2DAngle real No
Knockback2DBounces boolean No
Knockback2DCollision real No
Knockback2DDefaultBounce boolean No
Knockback2DDefaultDestRadius real No
Knockback2DDefaultFriction real No
Knockback2DDefaultFX string No
Knockback2DDefaultFXRate real No
Knockback2DDefaultGravity real No
Knockback2DDefaultKillTrees boolean No
Knockback2DDefaultPause boolean No
Knockback2DDestRadius real No
Knockback2DDistance real No
Knockback2DFriction real No
Knockback2DFXRate real No
Knockback2DGravity real No
Knockback2DHeight real No
Knockback2DKillTrees boolean No
Knockback2DLoopFX string No
Knockback2DOnImpact trigger No
Knockback2DOverride boolean No
Knockback2DPause boolean No
Knockback2DRobustPathing integer No
Knockback2DSimple boolean No
Knockback2DSource unit No
Knockback2DTime real No
Knockback2DTreeOrDebris string No
Knockback2DUnbiasedCollision boolean No
Knockback2DUnit unit No
LoopInt integer No
MS_Ability abilcode No
MS_AbilityLvl integer Yes
MS_AbilityStun abilcode No
MS_AoE real No
MS_AttackType attacktype No
MS_Blue real No
MS_Caster unit Yes
MS_Counter_SFX real Yes
MS_CurrentHeight real No
MS_Damage real Yes
MS_DamageType damagetype No
MS_DestroyTreeAoE real No
MS_DestroyTrees boolean No
MS_DistanceTraveled real Yes
MS_Dummy unitcode No
MS_DummyCaster unit No
MS_FallRate_XY real No
MS_FallRate_Z real No
MS_FallTime real No
MS_Green real No
MS_KBAoE real No
MS_KBDistance real No
MS_KBTime real No
MS_LandAoE real No
MS_LandingDamage real No
MS_LoopInt integervar No
MS_M_SpawnDistance real No
MS_M_SpawnHeight real No
MS_MaxIndex integer No
MS_MaxLevel integer No
MS_Meteor_SFX effect Yes
MS_MeteorDummy unit Yes
MS_MeteorLoc location No
MS_MeteorSize real No
MS_MoveRate real Yes
MS_NodeNext integer Yes
MS_NodePrev integer Yes
MS_Owner player Yes
MS_PeriodicTimer real No
MS_RecycledSize integer No
MS_RecycledStack integer Yes
MS_Red real No
MS_RollDirection real Yes
MS_RollDistance real Yes
MS_RollTime real Yes
MS_SFX_FallFreq real No
MS_SFX_RollFreq real Yes
MS_SFXDeath string No
MS_SFXFall string No
MS_SFXKB string No
MS_SFXLand string No
MS_SFXMeteor string No
MS_SFXRoll string No
MS_Size real No
MS_Spell_ID integer No
MS_SpellCount integer No
MS_Stage integer Yes
MS_StunAoE real No
MS_TargetLoc location Yes
MS_TempDest destructable No
MS_TempHeight real No
MS_TempInt integervar No
MS_TempLoc location No
MS_TempReal real No
MS_TempUnit unit No
MS_TreeKiller unit No
pl1 unit No
pl2 unit No
pl3 unit No
pl4 unit No
pl5 unit No
pl6 unit No
pl7 unit No
pl8 unit No
Radians_QuarterPi real No
Radians_QuarterTurn real No
Radians_Turn real No
SB_Ability abilcode No
SB_dUMMY unitcode No
SB_Dummy unit Yes
SB_SFXSlash string No
SB_Size real No
SB_SlashSize real No
UDex integer No
UDexGen integer No
UDexNext integer Yes
UDexPrev integer Yes
UDexRecycle integer No
UDexUnits unit Yes
UDexWasted integer No
UnitIndexerEnabled boolean No
UnitIndexEvent real No
Grim final
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Grim Final NNN
  Actions
    Wait 2 seconds
    Unit - Order (Random unit from (Units owned by (Owner of (Casting unit)) of type Grim final NNN)) to Night Elf Warden - Fan Of Knives.
    Wait 1.00 seconds
    Unit - Order (Random unit from (Units owned by (Owner of (Casting unit)) of type Grim final NNN)) to Night Elf Warden - Fan Of Knives.
    Wait 1.00 seconds
    Unit - Order (Random unit from (Units owned by (Owner of (Casting unit)) of type Grim final NNN)) to Night Elf Warden - Fan Of Knives.
hokages
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Summon hokages (Neutral Hostile)
  Actions
    Unit - Create 1.Nidiame for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 256.00 towards ((Facing of (Casting unit)) + 45.00) degrees.) facing (Facing of (Casting unit)) degrees
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Summon hokages (Neutral Hostile) for (Casting unit)) Equal to 1
      Then - Actions
        Unit - Add a 20.00 second Generic expiration timer to (Last created unit)
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Level of Summon hokages (Neutral Hostile) for (Casting unit)) Equal to 2
          Then - Actions
            Unit - Add a 35.00 second Generic expiration timer to (Last created unit)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Level of Summon hokages (Neutral Hostile) for (Casting unit)) Equal to 3
              Then - Actions
                Unit - Add a 50.00 second Generic expiration timer to (Last created unit)
              Else - Actions
    Unit - Create 1.Shodiame for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 256.00 towards ((Facing of (Casting unit)) - 45.00) degrees.) facing (Facing of (Casting unit)) degrees
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Level of Summon hokages (Neutral Hostile) for (Casting unit)) Equal to 1
      Then - Actions
        Unit - Add a 20.00 second Generic expiration timer to (Last created unit)
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Level of Summon hokages (Neutral Hostile) for (Casting unit)) Equal to 2
          Then - Actions
            Unit - Add a 35.00 second Generic expiration timer to (Last created unit)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Level of Summon hokages (Neutral Hostile) for (Casting unit)) Equal to 3
              Then - Actions
                Unit - Add a 50.00 second Generic expiration timer to (Last created unit)
              Else - Actions
gates
  Events
    Unit - A unit Is attacked
  Conditions
    ((Attacked unit) has buff t) Equal to True
    ((Random unit from (Units of type Triple Doors)) is alive) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Strength of (Attacking unit) (Exclude bonuses)) Greater than (Agility of (Attacking unit) (Exclude bonuses))
      Then - Actions
        Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + ((Real((Strength of (Attacking unit) (Include bonuses)))) + 20.00))
      Else - Actions
        Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + ((Real((Agility of (Attacking unit) (Include bonuses)))) + 20.00))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Strength of (Attacking unit) (Exclude bonuses)) Greater than (Agility of (Attacking unit) (Exclude bonuses))
      Then - Actions
        Unit - Cause (Random unit from (Units of type Triple Doors)) to damage (Random unit from (Units of type Triple Doors)), dealing (20.00 + (Real((Strength of (Attacking unit) (Exclude bonuses))))) damage of attack type Chaos and damage type Normal
      Else - Actions
        Unit - Cause (Random unit from (Units of type Triple Doors)) to damage (Random unit from (Units of type Triple Doors)), dealing (20.00 + (Real((Agility of (Attacking unit) (Exclude bonuses))))) damage of attack type Chaos and damage type Normal
Green Cero
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Green Cero
  Actions
    Sound - Play xw02 <gen>
Susanoo
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Sasuke Susanoo
  Actions
    Sound - Play Crick <gen>
Gran Ray Cero sound
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Gran Ray Cero
  Actions
    Sound - Play glmq02 <gen>
Grimjow Cero
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Cero
  Actions
    Sound - Play glmq05 <gen>
grimjow cero dust wave
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Gran Ray Cero
  Actions
    Wait 3.00 game-time seconds
    Unit - Create 1 dustwave for Neutral Passive at (Position of ) facing (Target point of issued order)
    Animation - Play (Last created unit)'s spell (animationname) animation
    Wait 0.50 game-time seconds
    Unit - Remove (Last created unit) from the game
gran ray cero animation
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Gran Ray Cero
  Actions
    Wait 3.00 game-time seconds
    Animation - Play 's spell 4 (animationname) animation
Sprenger
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Sprenger
  Actions
    Sound - Play sp <gen>
Soiton Waves
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Soiton Waves
  Actions
    Sound - Play Suzinbyuk <gen>
Kamui
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kamui!!!
  Actions
    Sound - Play kkwhy <gen>
Kamui EYE
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kamui!!!
  Actions
    Unit - Create 1 KAMUI EYE for Neutral Passive at (Target point of ability being cast) facing (Position of )
Mokudon no jutsu
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to tree fall
  Actions
    Sound - Play Mokdunbisul <gen>
WEEEEEEEE
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to 8 Tails
  Actions
    Sound - Play 152 <gen>
Summon dogs
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Summoning technique: Dogs
  Actions
    Sound - Play Dogs <gen>
Mugetsu
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Final Getsuga Tensou
  Actions
    Sound - Play Mugtsu <gen>
    Wait 3.00 game-time seconds
    Unit - Kill (Triggering unit)
Stab
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Stab
  Actions
    Sound - Play 153 <gen>
snake vomit
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Snake Vomit
  Actions
    Sound - Play Zamyungsasu <gen>
Edo tensei
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Summon hokages (Neutral Hostile)
  Actions
    Sound - Play Yetozunsang <gen>
Raikiri
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Raikiri
  Actions
    Sound - Play lq <gen>
triple doors
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Sanjurashomon
  Actions
    Sound - Play samjung <gen>
hokage revival
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Frost Arrows
  Actions
    Sound - Play Yetozunsang <gen>
Sapok
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Sand Trap
  Actions
    Sound - Play sapok <gen>
Black Cero
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Black Cero
  Actions
    Sound - Play xw01 <gen>
Lanza
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Lanza
  Actions
    Sound - Play ltzq <gen>
Enclose
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Segunda Etapa
  Actions
    Sound - Play xiaowu <gen>
FIREBALL
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to FIREBALL
  Actions
    Sound - Play ZZhqs <gen>
Rasengan
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Rasengan
  Actions
    Sound - Play Rasengan__juste__Part_2 <gen>
Killer bee transform
  Events
    Unit - 8 Tails Jinchuuriki 0004 <gen> Begins casting an ability
  Conditions
  Actions
    Animation - Play 8 Tails Jinchuuriki 0004 <gen>'s Spell two (animationname) animation
naruto spell
  Events
    Unit - Begins casting an ability
  Conditions
  Actions
    Animation - Play 's Spell (animationname) animation
Fuuton Rasen Shuuriken
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Fuuton
  Actions
    Sound - Play Fuuton_Rasen_Suriken_Part_2 <gen>
Senbornzakura
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Senbornzakura
  Actions
    Sound - Play Sihea_Chunbonang <gen>
Bakudo 61
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Bakudo 61
  Actions
    Sound - Play Gwido <gen>
Tensa Zangetsu
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Tensa Zangetsu
  Actions
    Sound - Play Manhea2 <gen>
Getsuga tenshou
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Getsuga Tenshou
  Actions
    Sound - Play 010A_0000 <gen>
Black Getsuga
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Black Getsuga Tenshou
  Actions
    Sound - Play gechgatesyou <gen>
Hado 91
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kouritsugi
  Actions
    Sound - Play hzy <gen>
Chidori
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Chidori
  Actions
    Sound - Play Chidori <gen>
Senpuu Oodama Rasengan
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Giant Rasengan
  Actions
    Sound - Play Naruto___Senpu_Oodama_Rasengan <gen>
Shunpo
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Shunpo
  Actions
    Sound - Play 0002_001C <gen>
Kyouka Suigetsu
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kyouka Suigetsu
  Actions
    Sound - Play 00E0_0000 <gen>
Hado 33
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Hado 33
  Actions
    Sound - Play 00ED_0000 <gen>
Kage Bunshin
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kage Bunshin no-jutsu
  Actions
    Sound - Play Tajuu_Kage_Bunshin_No_Jutsu <gen>
Shuukei
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Shuukei Haktaiken
  Actions
    Sound - Play 00FF_0000 <gen>
kirin
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kirin
  Actions
    Sound - Play 203 <gen>
    Wait 0.60 game-time seconds
    Sound - Play 206 <gen>
Bankai senbornzakura
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Bankai: Senbornzakura
  Actions
    Sound - Play Manhea_Chunbonang <gen>
Nagashi
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Chidori Nagashi
  Actions
    Sound - Play Chidori_Nagashi <gen>
fuuton 2
  Events
    Unit - Begins casting an ability
  Conditions
    (Ability being cast) Equal to Fuuton
  Actions
    Unit - Add Fuuton Release!!! to (Triggering unit)
    Wait 10.00 game-time seconds
    Unit - Remove Fuuton Release!!! from (Triggering unit)
Kirin remove
  Events
    Unit - Uchiha Survivor 0008 <gen> Begins casting an ability
  Conditions
    (Ability being cast) Equal to Sasuke Susanoo
  Actions
    Unit - Remove Kirin from Uchiha Survivor 0008 <gen>
    Wait 36.00 game-time seconds
    Wait until ((Level of ) Equal to 40), checking every 1 seconds
    Unit - Add Kirin to
sage fuuton
  Events
    Unit - Begins casting an ability
  Conditions
    (Ability being cast) Equal to Naruto Mode's
  Actions
    Unit - Remove Fuuton from (Triggering unit)
    Wait 38.00 game-time seconds
    Unit - Add Fuuton to (Triggering unit)
blasty
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Tailed Beast Bomb
  Actions
    Special Effect - Create a special effect attached to the overhead (attachpoint) of (Triggering unit) using DragonBallWave.mdx
    Wait 2.50 game-time seconds
    Special Effect - Destroy (Last created special effect)
Gran Ray Cero 1
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Gran Ray Cero
  Actions
    Animation - Play 's Spell 4 (animationname) animation
    Special Effect - Create a special effect attached to the right,arm (attachpoint) of (Triggering unit) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
    Wait 2.00 game-time seconds
    Special Effect - Destroy (Last created special effect)
CERO GREEN
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Green Cero
  Actions
    Animation - Play 's Spell Throw (animationname) animation
    Wait 0.50 game-time seconds
    Special Effect - Create a special effect attached to the right,arm (attachpoint) of using GranRayFXbyDeckai.mdx
    Wait 1.50 game-time seconds
    Special Effect - Destroy (Last created special effect)
blasty Copy
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Kyuubi Tailed Beast Bomb
  Actions
    Special Effect - Create a special effect attached to the overhead (attachpoint) of (Triggering unit) using SephirothBall.mdx
    Wait 2.50 game-time seconds
    Special Effect - Destroy (Last created special effect)
blasty Copy Copy
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Bijuu Bomb Kyuubi
  Actions
    Special Effect - Create a special effect attached to the overhead (attachpoint) of (Triggering unit) using SephirothBall.mdx
    Wait 2.50 game-time seconds
    Special Effect - Destroy (Last created special effect)
Red cero
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Red Cero
  Actions
    Sound - Play byh04 <gen>
Grimjow Release
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Grimjow Release
  Actions
    Sound - Play glmq01 <gen>
    Wait 2.35 game-time seconds
    Sound - Play glmq04 <gen>
Bijuu Dama
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Perfected Bijuu Dama
  Actions
    Unit - Create 1 Bijuu Dama 1 for Neutral Passive at (Position of (Triggering unit)) facing (Position of (Triggering unit))
    Unit - Add a 2.50 second Generic expiration timer to (Last created unit)
rasen shurkien unit
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Fuuton Release!!!
  Actions
    Wait 0.50 game-time seconds
    Unit - Create 1 Rasen shuriken for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Unit - Create 1 Rasen shuriken for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Unit - Create 1 Rasen shuriken for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Unit - Create 1 Rasen shuriken for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
rasenshurken unit 2
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Fuuton Release!!!
  Actions
    Unit - Create 1 dustwave blue for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Animation - Play (Last created unit)'s death (animationname) animation
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Unit - Create 1 Rasen shuriken for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Animation - Play (Last created unit)'s death (animationname) animation
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
Bijuu Dama 2
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Perfected Bijuu Dama
  Actions
    Wait 2.50 game-time seconds
    Unit - Create 1 Bijuu Dama 2 for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Wait 3.00 game-time seconds
    Unit - Remove (Last created unit) from the game
kirin explosion
  Events
    Unit - Uchiha Survivor 0008 <gen> Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Kirin
  Actions
    Wait 2.40 game-time seconds
    Unit - Create 1 lightning fall for Neutral Passive at (Target point of ability being cast) facing (Target point of ability being cast)
    Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
kirin explosion Copy
  Events
    Unit - Uchiha Survivor 0008 <gen> Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Kirin
  Actions
    Wait 0.40 game-time seconds
    Unit - Create 1 laser strike for Neutral Passive at (Target point of ability being cast) facing (Target point of ability being cast)
    Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
kirin explosion Copy 2
  Events
    Unit - Uchiha Survivor 0008 <gen> Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kirin
  Actions
    Wait 3.10 game-time seconds
    Unit - Create 1 Kirin unit for Neutral Passive at (Target point of ability being cast) facing (Target point of ability being cast)
    Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Black Cero effect
  Events
    Unit - Begins casting an ability
  Conditions
    (Ability being cast) Equal to Green Cero
  Actions
    Wait 0.30 game-time seconds
    Unit - Create 1 Black Cero for Neutral Passive at (Position of ) facing (Target point of ability being cast)
    Unit - Add a 1.10 second Generic expiration timer to (Last created unit)
HADO EXPLODE
  Events
    Unit - Shinigami 0002 <gen> Begins casting an ability
  Conditions
    (Ability being cast) Equal to Kouritsugi
  Actions
    Unit - Create 1 Hado 90 Unit for Neutral Passive at (Target point of ability being cast) facing (Target point of ability being cast)
    Unit - Add a 1.80 second Generic expiration timer to (Last created unit)
Cero Explode
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Purple Cero
  Actions
    Wait 1.80 game-time seconds
    Unit - Create 1 aizen cero explode for Neutral Passive at (Target point of ability being cast) facing (Target point of ability being cast)
    Unit - Add a 3.10 second Generic expiration timer to (Last created unit)
Cero Explode Copy
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Purple Cero
  Actions
    Wait 1.80 game-time seconds
    Unit - Create 1 aizen cero explode 22 for Neutral Passive at (Target point of ability being cast) facing (Target point of ability being cast)
    Unit - Add a 1.30 second Generic expiration timer to (Last created unit)
kirin shake
  Events
    Unit - Uchiha Survivor 0008 <gen> Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Kirin
  Actions
    Wait 2.00 game-time seconds
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Camera - Shake the camera for (Picked player) with magnitude 20.00
    Wait 2.00 game-time seconds
    Camera - Stop swaying/shaking the camera for Player 1 (Red).
    Camera - Stop swaying/shaking the camera for Player 2 (Blue).
    Camera - Stop swaying/shaking the camera for Player 3 (Teal).
    Camera - Stop swaying/shaking the camera for Player 4 (Purple).
    Camera - Stop swaying/shaking the camera for Player 5 (Yellow).
    Camera - Stop swaying/shaking the camera for Player 6 (Orange).
    Camera - Stop swaying/shaking the camera for Player 7 (Green).
    Camera - Stop swaying/shaking the camera for Player 8 (Pink).
rasenshuriken shake
  Events
    Unit - Begins casting an ability
  Conditions
    (Ability being cast) Equal to Fuuton Release!!!
  Actions
    Wait 0.50 game-time seconds
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Camera - Shake the camera for (Picked player) with magnitude 12.00
    Wait 2.00 game-time seconds
    Camera - Stop swaying/shaking the camera for Player 1 (Red).
    Camera - Stop swaying/shaking the camera for Player 2 (Blue).
    Camera - Stop swaying/shaking the camera for Player 3 (Teal).
    Camera - Stop swaying/shaking the camera for Player 4 (Purple).
    Camera - Stop swaying/shaking the camera for Player 5 (Yellow).
    Camera - Stop swaying/shaking the camera for Player 6 (Orange).
    Camera - Stop swaying/shaking the camera for Player 7 (Green).
    Camera - Stop swaying/shaking the camera for Player 8 (Pink).
lanza shake
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Lanza
  Actions
    Wait 1.20 game-time seconds
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Camera - Shake the camera for (Picked player) with magnitude 20.00
    Wait 2.00 game-time seconds
    Camera - Stop swaying/shaking the camera for Player 1 (Red).
    Camera - Stop swaying/shaking the camera for Player 2 (Blue).
    Camera - Stop swaying/shaking the camera for Player 3 (Teal).
    Camera - Stop swaying/shaking the camera for Player 4 (Purple).
    Camera - Stop swaying/shaking the camera for Player 5 (Yellow).
    Camera - Stop swaying/shaking the camera for Player 6 (Orange).
    Camera - Stop swaying/shaking the camera for Player 7 (Green).
    Camera - Stop swaying/shaking the camera for Player 8 (Pink).
Aizen HOLD
  Events
    Unit - A unit Begins casting an ability
  Conditions
    (Ability being cast) Equal to Aizen Hold (Neutral Hostile 1)
  Actions
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Wait 0.20 game-time seconds
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Wait 0.30 game-time seconds
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Wait 0.40 game-time seconds
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Wait 0.50 game-time seconds
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Wait 0.60 game-time seconds
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Wait 0.70 game-time seconds
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
    Wait 0.80 game-time seconds
    Unit - Create 1 Aizen Hold for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
    Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
order help
  Events
    Unit - A unit Is issued an order targeting a point
  Conditions
    (Issued order) Equal to (Order(attack))
    ((Ordered unit) is A Hero) Equal to True
    ((Owner of (Ordered unit)) controller) Equal to User
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Owner of (Matching unit)) controller) Equal to Computer) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Ordered unit)).) Equal to True)))) and do (Actions)
      Loop - Actions
        Unit - Order (Picked unit) to Attack-Move To.(Target point of issued order)
Com attacks
  Events
    Time - Every 20.00 seconds of game time
  Conditions
    duelon Equal to 0
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Hero level of (Picked unit)) Greater than or equal to 20
            (Random integer number between 1 and 10) Greater than 6
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Hero level of (Picked unit)) Greater than or equal to 40
                (Random integer number between 1 and 10) Greater than 6
              Then - Actions
                Unit - Order (Picked unit) to Attack-Move To.(Random point in Mid_Lane <gen>)
                Unit - Order (Picked unit) to Attack-Move To.(Random point in Bottom_Lane <gen>)
              Else - Actions
                Unit - Order (Picked unit) to Attack-Move To.(Random point in Top_Lane <gen>)
                Unit - Order (Picked unit) to Attack-Move To.(Position of (Random unit from (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Picked unit)).) Equal to True)))))
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Random integer number between 1 and 10) Greater than 5
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Random integer number between 1 and 10) Greater than 5
                  Then - Actions
                    Unit - Order (Picked unit) to Attack-Move To.(Random point in Mid_Lane <gen>)
                    Unit - Order (Picked unit) to Attack-Move To.(Random point in Bottom_Lane <gen>)
                  Else - Actions
                    Unit - Order (Picked unit) to Attack-Move To.(Random point in Top_Lane <gen>)
              Else - Actions
                Unit - Order (Picked unit) to Attack-Move To.(Position of (Random unit from (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Picked unit)).) Equal to True)))))
Player2
  Events
    Unit - A unit owned by Player 2 (Blue).Is issued an order targeting an object
  Conditions
    (Player 2 (Blue) controller) Equal to Computer
    ((Matching unit) is selected by Player 2 (Blue).) Equal to True
    ((Unit-type of (Matching unit)) is A Hero) Equal to True
    (Player 2 (Blue) is an enemy of Player 10 (Light Blue).) Equal to True
    (Player 2 (Blue) is an enemy of Player 5 (Yellow).) Equal to True
    (Player 2 (Blue) is an enemy of Player 6 (Orange).) Equal to True
    (Player 2 (Blue) is an enemy of Player 7 (Green).) Equal to True
    (Player 2 (Blue) is an enemy of Player 8 (Pink).) Equal to True
  Actions
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 10 (Light Blue).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 5 (Yellow).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 6 (Orange).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 7 (Green).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 8 (Pink).))
Player5
  Events
    Unit - A unit owned by Player 5 (Yellow).Is issued an order targeting an object
  Conditions
    (Player 5 (Yellow) controller) Equal to Computer
    ((Matching unit) is selected by Player 5 (Yellow).) Equal to True
    ((Unit-type of (Matching unit)) is A Hero) Equal to True
    (Player 5 (Yellow) is an enemy of Player 9 (Gray).) Equal to True
    (Player 5 (Yellow) is an enemy of Player 2 (Blue).) Equal to True
    (Player 5 (Yellow) is an enemy of Player 1 (Red).) Equal to True
    (Player 5 (Yellow) is an enemy of Player 3 (Teal).) Equal to True
    (Player 5 (Yellow) is an enemy of Player 4 (Purple).) Equal to True
  Actions
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 9 (Gray).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 2 (Blue).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 1 (Red).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 3 (Teal).))
    Unit - Order (Matching unit) to Attack.(Random unit from (Units owned by Player 4 (Purple).))
Map
  Events
    Map initialization
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Player - Make (Picked player) treat Neutral Extra as an Enemy
        Player - Make Neutral Extra treat (Picked player) as an Enemy
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
    Trigger - Turn on MapMusic <gen>
region 15
  Events
    Map initialization
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in Region_015 <gen> owned by Neutral Passive) and do (Actions)
      Loop - Actions
        Unit - Change ownership of (Picked unit) to Neutral Victim and Change color
MapMusic
  Events
    Time - Elapsed game time is 3.00 seconds
  Conditions
  Actions
    Sound - Play war3mapImported\MLBB Menu Music Vol 2.mp3 (musictheme).
    Sound - Play war3mapImported\MLBB Menu Music Vol 1.mp3 (musictheme).
    Sound - Play war3mapImported\MLBB Battle Music 2.mp3 (musictheme).
    Sound - Play war3mapImported\MLBB Menu Music Vol 1.mp3 (musictheme).
    Sound - Play war3mapImported\MLBB Battle Music 1.mp3 (musictheme).
    Sound - Play war3mapImported\One Piece Theme.mp3 (musictheme).
    Sound - Play war3mapImported\Empire Earth Theme1.mp3 (musictheme).
    Sound - Play war3mapImported\War2IntroMusic.mp3 (musictheme).
    Sound - Set Music to 100.00%
Kakashi
  Events
    Unit - A unit comes within 200.00 of Copy-Cat Ninja 0010 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Copy-Cat Ninja 0010 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Copy-Cat Ninja 0010 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Copy-Cat Ninja 0010 <gen> instantly to (Center of AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Sasuke
  Events
    Unit - A unit comes within 200.00 of Uchiha Survivor 0008 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Uchiha Survivor 0008 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Uchiha Survivor 0008 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Uchiha Survivor 0008 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Madara
  Events
    Unit - A unit comes within 200.00 of Madara 0018 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Madara 0018 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Madara 0018 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Madara 0018 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Shingami
  Events
    Unit - A unit comes within 200.00 of Shinigami 0002 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Shinigami 0002 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Shinigami 0002 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Shinigami 0002 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Orochimaru
  Events
    Unit - A unit comes within 200.00 of Legendary Sanin 0021 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Legendary Sanin 0021 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Legendary Sanin 0021 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Legendary Sanin 0021 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Arthas
  Events
    Unit - A unit comes within 200.00 of Arthas Death Knight 0006 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Arthas Death Knight 0006 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Arthas Death Knight 0006 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Arthas Death Knight 0006 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Demon Knight
  Events
    Unit - A unit comes within 200.00 of Demon Knight 0000 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Demon Knight 0000 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Demon Knight 0000 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Demon Knight 0000 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Killer BEe
  Events
    Unit - A unit comes within 200.00 of 8 Tails Jinchuuriki 0004 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of 8 Tails Jinchuuriki 0004 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move 8 Tails Jinchuuriki 0004 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move 8 Tails Jinchuuriki 0004 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Ichigo
  Events
    Unit - A unit comes within 200.00 of Substitute Shinigami 0001 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Substitute Shinigami 0001 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Substitute Shinigami 0001 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Substitute Shinigami 0001 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Marksman
  Events
    Unit - A unit comes within 200.00 of Marksman Master 0132 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Marksman Master 0132 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Marksman Master 0132 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Marksman Master 0132 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Lion Rider
  Events
    Unit - A unit comes within 200.00 of Lion Rider 0131 <gen>
  Conditions
    (Unit-type of (Entering unit)) Equal to Wisp
  Actions
    Unit - Remove (Entering unit) from the game
    Unit - Change ownership of Lion Rider 0131 <gen> to (Owner of (Entering unit)) and Change color
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Entering unit) belongs to an ally of Player 9 (Gray).) Equal to True
      Then - Actions
        Unit - Move Lion Rider 0131 <gen> instantly to (Random point in AlliesBase <gen>), facing Default building facing degrees
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Entering unit) belongs to an ally of Player 10 (Light Blue).) Equal to True
          Then - Actions
            Unit - Move Lion Rider 0131 <gen> instantly to (Random point in AxisBase <gen>), facing Default building facing degrees
          Else - Actions
Jungle 1
  Events
    Time - Every 20.00 seconds of game time
  Conditions
    (Number of units in (Units in Jungle_1 <gen>)) Less than or equal to 30
  Actions
    Unit - Create 5 Furbolg Tracker for Neutral Hostile at (Center of Jungle_1 <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Giant Wolf for Neutral Hostile at (Center of Jungle_1 <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Ogre Magi for Neutral Hostile at (Center of Jungle_1 <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Rock Golem for Neutral Hostile at (Center of Jungle_1 <gen>) facing (Position of (Last created unit))
    Trigger - Run (This trigger) (checking conditions)
Jungle 2
  Events
    Time - Every 30.00 seconds of game time
  Conditions
    (Number of units in (Units in Jungle_2 <gen>)) Less than or equal to 30
  Actions
    Unit - Create 3 Overlord Arachnathid for Neutral Hostile at (Center of Jungle_2 <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Giant Polar Bear for Neutral Hostile at (Center of Jungle_2 <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Tuskarr Sorcerer for Neutral Hostile at (Center of Jungle_2 <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Blue Dragonspawn Sorcerer for Neutral Hostile at (Center of Jungle_2 <gen>) facing (Position of (Last created unit))
    Trigger - Run (This trigger) (checking conditions)
Jungle 3
  Events
    Time - Every 15.00 seconds of game time
  Conditions
    (Number of units in (Units in Jungle_3 <gen>)) Less than or equal to 50
  Actions
    Unit - Create 5 Centaur Drudge for Neutral Hostile at (Center of Jungle_3 <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Hydra for Neutral Hostile at (Center of Jungle_3 <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Spider Crab Limbripper for Neutral Hostile at (Center of Jungle_3 <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Brigand for Neutral Hostile at (Center of Jungle_3 <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Heretic for Neutral Hostile at (Center of Jungle_3 <gen>) facing (Position of (Last created unit))
    Trigger - Run (This trigger) (checking conditions)
Jungle 4
  Events
    Time - Every 25.00 seconds of game time
  Conditions
    (Number of units in (Units in Jungle_4 <gen>)) Less than or equal to 45
  Actions
    Unit - Create 5 Thunder Lizard for Neutral Hostile at (Center of Jungle_4 <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Ice Revenant for Neutral Hostile at (Center of Jungle_4 <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Dark Wizard for Neutral Hostile at (Center of Jungle_4 <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Granite Golem for Neutral Hostile at (Center of Jungle_4 <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Dire Frost Wolf for Neutral Hostile at (Center of Jungle_4 <gen>) facing (Position of (Last created unit))
    Trigger - Run (This trigger) (checking conditions)
Lord Guard Area
  Events
    Time - Every 25.00 seconds of game time
  Conditions
    (Number of units in (Units in Lord_Guard_Area <gen>)) Less than or equal to 20
  Actions
    Unit - Create 5 Infernal Juggernaut for Neutral Hostile at (Center of Lord_Guard_Area <gen>) facing (Position of (Last created unit))
    Unit - Create 3 Siege Golem for Neutral Hostile at (Center of Lord_Guard_Area <gen>) facing (Position of (Last created unit))
    Unit - Create 5 Dark Golem (Allies) for Neutral Hostile at (Center of Lord_Guard_Area <gen>) facing (Position of (Last created unit))
    Trigger - Run (This trigger) (checking conditions)
remove wisp
  Events
    Map initialization
  Conditions
  Actions
    Wait 1.00 seconds
    Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Wisp) and (((Owner of (Matching unit)) slot status) Not equal to Is playing))) and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
hero choose
  Events
    Time - Elapsed game time is 30.00 seconds
  Conditions
    (Region_015 <gen> contains (Random unit from (Units in Region_015 <gen> matching ((((Matching unit) is A Hero) Not equal to True) and (((Owner of (Matching unit)) controller) Not equal to User))))) Equal to True
  Actions
    Unit - Order (Random unit from (Units in Region_015 <gen> matching ((((Matching unit) is A Hero) Not equal to True) and (((Owner of (Matching unit)) controller) Not equal to User)))) to Move To.(Position of (Random unit from (Units in Region_015 <gen> matching (((Matching unit) is A Hero) Equal to True))))
    Wait 4.00 seconds
    Trigger - Run (This trigger) (checking conditions)
levelin 1
  Events
    Unit - A unit Gains a level
  Conditions
    Legendary Sanin 0021 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Snake Vomit
    Hero - Learn skill for (Leveling Hero): Sanjurashomon
    Hero - Learn skill for (Leveling Hero): Summon hokages (Neutral Hostile)
levelin 2
  Events
    Unit - A unit Gains a level
  Conditions
    8 Tails Jinchuuriki 0004 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Lightning Blades
    Hero - Learn skill for (Leveling Hero): 8 swords
    Hero - Learn skill for (Leveling Hero): 8 Tails
levelin 3
  Events
    Unit - A unit Gains a level
  Conditions
    Copy-Cat Ninja 0010 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Raikiri
    Hero - Learn skill for (Leveling Hero): Water Style: Shark
    Hero - Learn skill for (Leveling Hero): Kamui!!!
levelin 4
  Events
    Unit - A unit Gains a level
  Conditions
    Arthas Death Knight 0006 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Rain of Fire (Demon)
    Hero - Learn skill for (Leveling Hero): Summon Dragon
    Hero - Learn skill for (Leveling Hero): Demon Aura (Plus Massive)
levelin 5
  Events
    Unit - A unit Gains a level
  Conditions
    Demon Knight 0000 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Blink
    Hero - Learn skill for (Leveling Hero): Magic Shield
    Hero - Learn skill for (Leveling Hero): Demon King
levelin 6
  Events
    Unit - A unit Gains a level
  Conditions
    Madara 0018 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): madara sharingan
    Hero - Learn skill for (Leveling Hero): Meteor Strike
levelin 7
  Events
    Unit - A unit Gains a level
  Conditions
    Shinigami 0002 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Kyouka Suigetsu
    Hero - Learn skill for (Leveling Hero): Hado 33
    Hero - Learn skill for (Leveling Hero): Hougyoku
levelin 8
  Events
    Unit - A unit Gains a level
  Conditions
    Substitute Shinigami 0001 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Zangetsu
    Hero - Learn skill for (Leveling Hero): Getsuga Tenshou
    Hero - Learn skill for (Leveling Hero): Tensa Zangetsu
levelin 9
  Events
    Unit - A unit Gains a level
  Conditions
    Uchiha Survivor 0008 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Chidori
    Hero - Learn skill for (Leveling Hero): Sasuke Susanoo
    Hero - Learn skill for (Leveling Hero): Kirin
levelin 10
  Events
    Unit - A unit Gains a level
  Conditions
    Marksman Master 0132 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Kyouka Suigetsu
    Hero - Learn skill for (Leveling Hero): Frost Arrow
    Hero - Learn skill for (Leveling Hero): Death Order
levelin 11
  Events
    Unit - A unit Gains a level
  Conditions
    Lion Rider 0131 <gen> Equal to (Leveling Hero)
  Actions
    Hero - Learn skill for (Leveling Hero): Heal Heroes
    Hero - Learn skill for (Leveling Hero): Slash Blue
    Hero - Learn skill for (Leveling Hero): Thunder Storm
    Hero - Learn skill for (Leveling Hero): Immortal
levelin11a
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Slash Blue
  Actions
    Set VariableSet SB_Ability = Slash Blue
    Set VariableSet SB_dUMMY = Dummy-slash
    Set VariableSet SB_SFXSlash = war3mapImported\Valiant Charge Royal.mdx
    Set VariableSet SB_Size = 5.00
    Set VariableSet SB_SlashSize = (SB_Size x 100.00)
    Set VariableSet SB_Dummy[1] = (Matching unit)
    Animation - Change SB_Dummy[1]'s size to (100%, 100%, 100%) of its original size
    Special Effect - Create a special effect at (Center of (Playable map area)) using SB_SFXSlash
revive
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 2 (Blue)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AlliesBase <gen>), Hide revival graphics
revive Copy
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 4 (Purple)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AlliesBase <gen>), Hide revival graphics
revive Copy 2
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 1 (Red)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AlliesBase <gen>), Hide revival graphics
revive Copy 3
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 3 (Teal)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AlliesBase <gen>), Hide revival graphics
Alliedvictory
  Events
    Unit - Main Base 0037 <gen> Dies
  Conditions
    ((Dying unit) is A structure) Equal to True
  Actions
    Game - Pause the game
    Game - Victory Player 1 (Red) (Show dialogs, Show scores)
    Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
    Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
    Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
WarningAllied
  Events
    Unit - Advanced Last Turret 0033 <gen> Is attacked
  Conditions
    ((Attacked unit) is A structure) Equal to True
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) is in (Units owned by Player 2 (Blue).).) Equal to True
            ((Picked unit) is A Hero) Equal to True
          Then - Actions
            Unit - Order (Picked unit) to Attack-Move To.(Position of Advanced Last Turret 0033 <gen>)
          Else - Actions
WarningAllied Copy
  Events
    Unit - Advanced Last Turret 0033 <gen> Is attacked
  Conditions
    ((Attacked unit) is A structure) Equal to True
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) is in (Units owned by Player 3 (Teal).).) Equal to True
            ((Picked unit) is A Hero) Equal to True
          Then - Actions
            Unit - Order (Picked unit) to Attack-Move To.(Position of Advanced Last Turret 0033 <gen>)
          Else - Actions
WarningAllied Copy Copy
  Events
    Unit - Advanced Last Turret 0033 <gen> Is attacked
  Conditions
    ((Attacked unit) is A structure) Equal to True
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) is in (Units owned by Player 4 (Purple).).) Equal to True
            ((Picked unit) is A Hero) Equal to True
          Then - Actions
            Unit - Order (Picked unit) to Attack-Move To.(Position of Advanced Last Turret 0033 <gen>)
          Else - Actions
revive Copy 5
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 5 (Yellow)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AxisBase <gen>), Hide revival graphics
revive Copy 5 Copy 4
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 6 (Orange)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AxisBase <gen>), Hide revival graphics
revive Copy 5 Copy
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 7 (Green)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AxisBase <gen>), Hide revival graphics
revive Copy 5 Copy 2
  Events
    Unit - A unit Dies
  Conditions
    ((Dying unit) is A Hero) Equal to True
    (Owner of (Dying unit)) Equal to Player 8 (Pink)
  Actions
    Hero - Instantly revive (Dying unit) at (Center of AxisBase <gen>), Hide revival graphics
AxisVictory
  Events
    Unit - Main Base 0029 <gen> Dies
  Conditions
    ((Dying unit) is A structure) Equal to True
  Actions
    Game - Pause the game
    Game - Victory Player 5 (Yellow) (Show dialogs, Show scores)
    Game - Victory Player 6 (Orange) (Show dialogs, Show scores)
    Game - Victory Player 7 (Green) (Show dialogs, Show scores)
    Game - Victory Player 8 (Pink) (Show dialogs, Show scores)
WarningAxis
  Events
    Unit - Advanced Last Turret 0039 <gen> Is attacked
  Conditions
    ((Attacked unit) is A structure) Equal to True
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) is in (Units owned by Player 5 (Yellow).).) Equal to True
            ((Picked unit) is A Hero) Equal to True
          Then - Actions
            Unit - Order (Picked unit) to Attack-Move To.(Position of Advanced Last Turret 0039 <gen>)
          Else - Actions
WarningAxis Copy
  Events
    Unit - Advanced Last Turret 0039 <gen> Is attacked
  Conditions
    ((Attacked unit) is A structure) Equal to True
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) is in (Units owned by Player 6 (Orange).).) Equal to True
            ((Picked unit) is A Hero) Equal to True
          Then - Actions
            Unit - Order (Picked unit) to Attack-Move To.(Position of Advanced Last Turret 0039 <gen>)
          Else - Actions
WarningAxis Copy Copy
  Events
    Unit - Advanced Last Turret 0039 <gen> Is attacked
  Conditions
    ((Attacked unit) is A structure) Equal to True
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) is in (Units owned by Player 7 (Green).).) Equal to True
            ((Picked unit) is A Hero) Equal to True
          Then - Actions
            Unit - Order (Picked unit) to Attack-Move To.(Position of Advanced Last Turret 0039 <gen>)
          Else - Actions
WarningAxis Copy Copy Copy
  Events
    Unit - Advanced Last Turret 0039 <gen> Is attacked
  Conditions
    ((Attacked unit) is A structure) Equal to True
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Picked unit) is in (Units owned by Player 8 (Pink).).) Equal to True
            ((Picked unit) is A Hero) Equal to True
          Then - Actions
            Unit - Order (Picked unit) to Attack-Move To.(Position of Advanced Last Turret 0039 <gen>)
          Else - Actions
Check Walkability Setup
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet CP_Rect = (Region(0, 0, 128.00, 128.00))
    Custom script: set udg_CP_Item = CreateItem('wtlg', 0, 0)
    Item - Hide CP_Item
    -------- Variables For Copy and Paste --------
    Set VariableSet CP_HiddenItemsIndex = 0
    Set VariableSet CP_HiddenItems[0] = No item
    Set VariableSet CP_Point = (Target point of ability being cast)
    Set VariableSet CP_PointIsWalkable = False
    Custom script: call RemoveLocation(udg_CP_Point)
Check Walkability
  Events
  Conditions
  Actions
    Custom script: local real x = GetLocationX(udg_CP_Point)
    Custom script: local real y = GetLocationY(udg_CP_Point)
    Custom script: local real x2 = 0
    Custom script: local real y2 = 0
    Custom script: call MoveRectTo(udg_CP_Rect, x, y)
    Item - Pick every item in CP_Rect and do (Actions)
      Loop - Actions
        Custom script: if IsItemVisible(GetEnumItem()) then
        Set VariableSet CP_HiddenItems[CP_HiddenItemsIndex] = (Picked item)
        Custom script: call SetItemVisible(udg_CP_HiddenItems[udg_CP_HiddenItemsIndex], false)
        Set VariableSet CP_HiddenItemsIndex = (CP_HiddenItemsIndex + 1)
        Custom script: endif
    Custom script: call SetItemPosition(udg_CP_Item, x, y)
    Custom script: set x2 = GetItemX(udg_CP_Item)
    Custom script: set y2 = GetItemY(udg_CP_Item)
    Custom script: call SetItemVisible(udg_CP_Item, false)
    Custom script: loop
    Custom script: exitwhen udg_CP_HiddenItemsIndex <= 0
    Custom script: set udg_CP_HiddenItemsIndex = udg_CP_HiddenItemsIndex - 1
    Custom script: call SetItemVisible(udg_CP_HiddenItems[udg_CP_HiddenItemsIndex], true)
    Custom script: set udg_CP_HiddenItems[udg_CP_HiddenItemsIndex] = null
    Custom script: endloop
    Custom script: set udg_CP_PointIsWalkable = ((x2-x)*(x2-x) + (y2-y)*(y2-y) <= 100) and (not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY))
This trigger works in two key phases:

1) During map initialization, enumerate all units of all players to give them an index.
2) Adds a second event to itself to index new units as they enter the map.

As a unit enters the map, check for any old units that may have been removed at some point in order to free their index.
Unit Indexer
  Events
    Map initialization
  Conditions
  Actions
    Custom script: call ExecuteFunc("InitializeUnitIndexer")
    Custom script: endfunction
    -------- --------
    -------- This is the most important function - it provides an index for units as they enter the map --------
    -------- --------
    Custom script: function IndexUnit takes nothing returns boolean
    Custom script: local integer pdex = udg_UDex
    -------- --------
    -------- You can use the boolean UnitIndexerEnabled to protect some of your undesirable units from being indexed --------
    -------- - Example: --------
    -------- -- Set UnitIndexerEnabled = False --------
    -------- -- Unit - Create 1 Dummy for (Triggering player) at TempLoc facing 0.00 degrees --------
    -------- -- Set UnitIndexerEnabled = True --------
    -------- --------
    -------- You can also customize the following block - if conditions are false the (Matching unit) won't be indexed. --------
    -------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        UnitIndexerEnabled Equal to True
      Then - Actions
        -------- --------
        -------- Generate a unique integer index for this unit --------
        -------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            UDexRecycle Equal to 0
          Then - Actions
            Set VariableSet UDex = (UDexGen + 1)
            Set VariableSet UDexGen = UDex
          Else - Actions
            Set VariableSet UDex = UDexRecycle
            Set VariableSet UDexRecycle = UDexNext[UDex]
        -------- --------
        -------- Link index to unit, unit to index --------
        -------- --------
        Set VariableSet UDexUnits[UDex] = (Matching unit)
        Unit - Set the custom value of UDexUnits[UDex] to UDex
        -------- --------
        -------- Use a doubly-linked list to store all active indexes --------
        -------- --------
        Set VariableSet UDexPrev[UDexNext[0]] = UDex
        Set VariableSet UDexNext[UDex] = UDexNext[0]
        Set VariableSet UDexNext[0] = UDex
        -------- --------
        -------- Fire index event for UDex --------
        -------- --------
        Set VariableSet UnitIndexEvent = 0.00
        Set VariableSet UnitIndexEvent = 1.00
        Set VariableSet UnitIndexEvent = 0.00
        Custom script: set udg_UDex = pdex
      Else - Actions
    Custom script: return false
    Custom script: endfunction
    -------- --------
    -------- The next function is called each time a unit enters the map --------
    -------- --------
    Custom script: function IndexNewUnit takes nothing returns boolean
    Custom script: local integer pdex = udg_UDex
    Custom script: local integer ndex
    -------- --------
    -------- Recycle indices of units no longer in-play every (15) units created --------
    -------- --------
    Set VariableSet UDexWasted = (UDexWasted + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        UDexWasted Equal to 15
      Then - Actions
        Set VariableSet UDexWasted = 0
        Set VariableSet UDex = UDexNext[0]
        Custom script: loop
        Custom script: exitwhen udg_UDex == 0
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Custom value of UDexUnits[UDex]) Equal to 0
          Then - Actions
            -------- --------
            -------- Remove index from linked list --------
            -------- --------
            Custom script: set ndex = udg_UDexNext[udg_UDex]
            Custom script: set udg_UDexNext[udg_UDexPrev[udg_UDex]] = ndex
            Custom script: set udg_UDexPrev[ndex] = udg_UDexPrev[udg_UDex]
            Set VariableSet UDexPrev[UDex] = 0
            -------- --------
            -------- Fire deindex event for UDex --------
            -------- --------
            Set VariableSet UnitIndexEvent = 2.00
            Set VariableSet UnitIndexEvent = 0.00
            -------- --------
            -------- Recycle the index for later use --------
            -------- --------
            Set VariableSet UDexUnits[UDex] = No unit
            Set VariableSet UDexNext[UDex] = UDexRecycle
            Set VariableSet UDexRecycle = UDex
            Custom script: set udg_UDex = ndex
          Else - Actions
            Set VariableSet UDex = UDexNext[UDex]
        Custom script: endloop
        Custom script: set udg_UDex = pdex
      Else - Actions
    -------- --------
    -------- Handle the entering unit (Matching unit) --------
    -------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Custom value of (Matching unit)) Equal to 0
      Then - Actions
        Custom script: call IndexUnit()
      Else - Actions
    Custom script: return false
    Custom script: endfunction
    -------- --------
    -------- The next function initializes the core of the system --------
    -------- --------
    Custom script: function InitializeUnitIndexer takes nothing returns nothing
    Custom script: local integer i = 0
    Custom script: local region re = CreateRegion()
    Custom script: local rect r = GetWorldBounds()
    Set VariableSet UnitIndexerEnabled = True
    Custom script: call RegionAddRect(re, r)
    Custom script: call TriggerRegisterEnterRegion(CreateTrigger(), re, Filter(function IndexNewUnit))
    Custom script: call RemoveRect(r)
    Custom script: set re = null
    Custom script: set r = null
    Custom script: loop
    Custom script: call GroupEnumUnitsOfPlayer(bj_lastCreatedGroup, Player(i), Filter(function IndexUnit))
    Custom script: set i = i + 1
    Custom script: exitwhen i == 16
    Custom script: endloop
    -------- --------
    -------- This is the "Unit Indexer Initialized" event, use it instead of "Map Initialization" for best results --------
    -------- --------
    Set VariableSet UnitIndexEvent = 3.00
    Set VariableSet UnitIndexEvent = 0.00
Knockback 2D Config
  Events
    Game - UnitIndexEvent becomes Equal to 3.00
  Conditions
  Actions
    -------- --------
    -------- Configure things below --------
    -------- --------
    -------- Set the timeout to be used throughout the system --------
    -------- --------
    Set VariableSet K2DTimeout = (1.00 / 60.00)
    -------- --------
    -------- Robust Pathing at 0 is only safe for collision sizes 16 and lower, but requires only one SetItemPosition check per timeout. --------
    -------- -------- 1 checks collision vertically and horizontally to momentum. Uses an extra 4 SetItemPosition checks pet timeout. --------
    -------- -------- 2 checks collision diagonally with momentum. Uses a total of 9 SetItemPosition checks per timeout. --------
    -------- In any case, if the unit only has size 16 or lower collision, only one SetItemPosition check will be used for it. --------
    -------- If RobustPathing is set to 2 and the unit has 36 or less collision, it will only use the normal check of 5 SetItemPosition calls --------
    -------- The only reason to use robustness above 1 is for visual continuity - it features potentially-less glitchy movement. --------
    -------- --------
    Set VariableSet Knockback2DRobustPathing = 2
    -------- --------
    -------- Keep the friction between 0.00 and 1.00, At 0.00, friction keeps the unit at the same speed for the knockback --------
    -------- 1.00 friction will be an evenly-distributed deceleration which sees the unit slow to a complete stop --------
    -------- Friction outside of these bounds gives the knockback a boomerang-effect, so you are welcome to experiment. --------
    -------- --------
    Set VariableSet Knockback2DDefaultFriction = 1.00
    Set VariableSet Knockback2DFriction = Knockback2DDefaultFriction
    -------- --------
    -------- Determine the default bouncing behavior of units. You can set this before knocking a unit back. --------
    -------- --------
    Set VariableSet Knockback2DDefaultBounce = True
    Set VariableSet Knockback2DBounces = Knockback2DDefaultBounce
    -------- --------
    -------- Determine the default mechanics of whether a unit should be unable to move while knocked back --------
    -------- --------
    Set VariableSet Knockback2DDefaultPause = False
    Set VariableSet Knockback2DPause = Knockback2DDefaultPause
    -------- --------
    -------- Determine if surrounding trees should be killed by default or not --------
    -------- --------
    Set VariableSet Knockback2DDefaultKillTrees = True
    Set VariableSet Knockback2DKillTrees = Knockback2DDefaultKillTrees
    -------- --------
    -------- If so, how wide should the radius be? 128.00 should be the minimum if you use pathing robustness greater than 0. --------
    -------- The minimum should be 64 if you use a robustness of 0. --------
    -------- --------
    Set VariableSet Knockback2DDefaultDestRadius = 128.00
    Set VariableSet Knockback2DDestRadius = Knockback2DDefaultDestRadius
    -------- --------
    -------- The "attack" option below will destroy any valid debris, from trees to barrels to creep homes. --------
    -------- If you just want to destroy trees, change the string to: harvest --------
    -------- --------
    Set VariableSet Knockback2DTreeOrDebris = attack
    -------- --------
    -------- 0.50 gravity will have equal ascend and decline rate, 1.00 is instant descend, 0.67 is twice as fast, 0.75 is three times as fast. --------
    -------- --------
    Set VariableSet Knockback2DDefaultGravity = 0.71
    Set VariableSet Knockback2DGravity = Knockback2DDefaultGravity
    -------- --------
    -------- Change the following to the default type of looping FX you want to have if you use Knockback Effects --------
    -------- --------
    Set VariableSet Knockback2DDefaultFX = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
    Set VariableSet Knockback2DLoopFX = Knockback2DDefaultFX
    -------- --------
    -------- How frequently should the effects appear per unit? This can also be customized per-knockback --------
    -------- --------
    Set VariableSet Knockback2DDefaultFXRate = 0.10
    Set VariableSet Knockback2DFXRate = Knockback2DDefaultFXRate
    -------- --------
    -------- Create an item to help verify pathing throughout the game --------
    -------- --------
    Set VariableSet CenterPoint = (Point(K2DX, K2DY))
    Item - Create Slippers of Agility +3 at CenterPoint
    Set VariableSet K2DItem = (Last created item)
    -------- --------
    -------- Create a harvest-capable unit to check if debris can be killed --------
    -------- --------
    Set VariableSet UnitIndexerEnabled = False
    Unit - Create 1.Hollow for Neutral Passive at CenterPoint facing 0.00 degrees
    Set VariableSet K2DDebrisKiller = (Last created unit)
    -------- --------
    -------- End Configuration --------
    -------- --------
    Set VariableSet UnitIndexerEnabled = True
    Custom script: call RemoveLocation(udg_CenterPoint)
    Game - Preload Knockback2DDefaultFX
    Item - Hide K2DItem
    Unit - Hide K2DDebrisKiller
    Unit - Pause K2DDebrisKiller
    Custom script: call UnitAddAbility(udg_K2DDebrisKiller, 'Aloc')
    Set VariableSet Radians_Turn = (Radians(360.00))
    Set VariableSet Radians_QuarterTurn = (Radians(90.00))
    Set VariableSet Radians_QuarterPi = (Radians(45.00))
    Set VariableSet K2DRegion = (Entire map)
    Set VariableSet K2DMaxX = (Max X of K2DRegion)
    Set VariableSet K2DMaxY = (Max Y of K2DRegion)
    Set VariableSet K2DMinX = (Min X of K2DRegion)
    Set VariableSet K2DMinY = (Min Y of K2DRegion)
    Set VariableSet K2DMaxDestRadius = (Knockback2DDefaultDestRadius x 2.00)
    Custom script: call SetRect(udg_K2DRegion, 0.00, 0.00, udg_K2DMaxDestRadius, udg_K2DMaxDestRadius)
    Set VariableSet K2DItemsFound = False
    Set VariableSet K2DItemOffset = False
Knockback 2D Destroy
  Events
    Game - UnitIndexEvent becomes Equal to 2.00
  Conditions
    IsUnitBeingKnockedBack[UDex] Equal to True
  Actions
    -------- --------
    -------- This trigger destroys any knockback; you can execute it yourself by first setting UDex to the custom value --------
    -------- --------
    Set VariableSet IsUnitBeingKnockedBack[UDex] = False
    Set VariableSet K2DNext[K2DPrev[UDex]] = K2DNext[UDex]
    Set VariableSet K2DPrev[K2DNext[UDex]] = K2DPrev[UDex]
    Set VariableSet K2DPrev[UDex] = 0
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DNext[0] Equal to 0
      Then - Actions
        Countdown Timer - Pause K2DTimer
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DHeight[UDex] Not equal to 0.00
      Then - Actions
        Animation - Change Knockback2DUnit flying height to (Default flying height of Knockback2DUnit) at 0.00
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DFreeze[UDex] Not equal to True
        (K2DImpact[UDex] is on) Equal to True
      Then - Actions
        Trigger - Run K2DImpact[UDex] (checking conditions)
      Else - Actions
    Set VariableSet K2DSource[UDex] = No unit
You can run this trigger, checking conditions if you want to play it safe.
Knockback 2D
  Events
  Conditions
    (Default movement speed of Knockback2DUnit) Not equal to 0.00
    K2DOverride[(Custom value of Knockback2DUnit)] Equal to False
  Actions
    Custom script: local integer pdex = udg_UDex
    Set VariableSet UDex = (Custom value of Knockback2DUnit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        IsUnitBeingKnockedBack[UDex] Equal to True
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Knockback2DOverride Equal to False
          Then - Actions
            Set VariableSet K2DAngle[UDex] = (Degrees(K2DAngle[UDex]))
            Set VariableSet Knockback2DAngle = ((Knockback2DAngle + K2DAngle[UDex]) x 0.50)
            Set VariableSet Knockback2DDistance = ((K2DDistanceLeft[UDex] + Knockback2DDistance) x 0.50)
            Set VariableSet Knockback2DTime = ((K2DTimeLeft[UDex] + Knockback2DTime) x 0.50)
          Else - Actions
        Trigger - Run Knockback_2D_Destroy <gen> (ignoring conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DNext[0] Equal to 0
      Then - Actions
        Custom script: call ExecuteFunc("StartKnockback2DTimer")
      Else - Actions
    Set VariableSet IsUnitBeingKnockedBack[UDex] = True
    Set VariableSet K2DPrev[K2DNext[0]] = UDex
    Set VariableSet K2DNext[UDex] = K2DNext[0]
    Set VariableSet K2DNext[0] = UDex
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Knockback2DHeight Not equal to 0.00
      Then - Actions
        Set VariableSet K2DHeight[UDex] = Knockback2DHeight
        Custom script: if UnitAddAbility(udg_Knockback2DUnit, 'Amrf') then
        Custom script: call UnitRemoveAbility(udg_Knockback2DUnit, 'Amrf')
        Custom script: endif
        Animation - Change Knockback2DUnit flying height to ((Default flying height of Knockback2DUnit) + Knockback2DHeight) at ((Knockback2DHeight - (Default flying height of Knockback2DUnit)) / (Knockback2DGravity x Knockback2DTime))
        Set VariableSet K2DHeightThreshold[UDex] = ((1 - Knockback2DGravity) x Knockback2DTime)
        Set VariableSet Knockback2DHeight = 0.00
      Else - Actions
        Set VariableSet K2DHeight[UDex] = 0.00
    Custom script: set udg_K2DX = GetUnitX(udg_Knockback2DUnit)
    Custom script: set udg_K2DY = GetUnitY(udg_Knockback2DUnit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Knockback2DPause Equal to True
      Then - Actions
        Set VariableSet K2DLastX[UDex] = K2DX
        Set VariableSet K2DLastY[UDex] = K2DY
      Else - Actions
    Set VariableSet K2DAngle[UDex] = (Radians(Knockback2DAngle))
    Set VariableSet K2DCos[UDex] = (Cos(Knockback2DAngle))
    Set VariableSet K2DSin[UDex] = (Sin(Knockback2DAngle))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Knockback2DUnit is A flying unit) Equal to True
      Then - Actions
        Set VariableSet K2DFlying[UDex] = True
      Else - Actions
        Set VariableSet K2DFlying[UDex] = False
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Knockback2DRobustPathing Greater than 0
          Then - Actions
            -------- --------
            -------- Handle the pathing checker based on the unit's collision size --------
            -------- --------
            Custom script: if not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 17, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 0
            Custom script: else
            Custom script: if not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 25, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 8
            Custom script: elseif not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 33, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 16
            Custom script: elseif not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 49, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 32
            Custom script: else
            Set VariableSet K2DRadius[UDex] = 48
            Custom script: endif
            Set VariableSet Knockback2DAngle = ((Knockback2DAngle + 90.00) mod 360.00)
            Set VariableSet K2DCosH[UDex] = (Cos(Knockback2DAngle))
            Set VariableSet K2DSinH[UDex] = (Sin(Knockback2DAngle))
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Knockback2DRobustPathing Equal to 2
                K2DRadius[UDex] Greater than 16
              Then - Actions
                Set VariableSet Knockback2DAngle = ((Knockback2DAngle + 45.00) mod 360.00)
                Set VariableSet K2DCosD1[UDex] = (Cos(Knockback2DAngle))
                Set VariableSet K2DSinD1[UDex] = (Sin(Knockback2DAngle))
                Set VariableSet Knockback2DAngle = ((Knockback2DAngle + 90.00) mod 360.00)
                Set VariableSet K2DCosD2[UDex] = (Cos(Knockback2DAngle))
                Set VariableSet K2DSinD2[UDex] = (Sin(Knockback2DAngle))
              Else - Actions
            Custom script: endif
          Else - Actions
    Set VariableSet K2DDistanceLeft[UDex] = Knockback2DDistance
    Set VariableSet Knockback2DDistance = (((1.00 + Knockback2DFriction) x Knockback2DDistance) / Knockback2DTime)
    Set VariableSet K2DFriction[UDex] = ((Knockback2DDistance / Knockback2DTime) x ((1.00 - (1 - Knockback2DFriction)) x (K2DTimeout x K2DTimeout)))
    Set VariableSet K2DVelocity[UDex] = (Knockback2DDistance x K2DTimeout)
    -------- --------
    Set VariableSet K2DKillTrees[UDex] = Knockback2DKillTrees
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Knockback2DKillTrees Equal to True
      Then - Actions
        -------- Square the radius so we don't have to use SquareRoot when comparing distance. --------
        Set VariableSet K2DDestRadius[UDex] = (Knockback2DDestRadius x Knockback2DDestRadius)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Knockback2DDestRadius x 2.00) Greater than K2DMaxDestRadius
          Then - Actions
            -------- Update the size of the enumerating rect to compensate for the desired extra radius. --------
            Set VariableSet K2DMaxDestRadius = (Knockback2DDestRadius x 2.00)
            Custom script: call SetRect(udg_K2DRegion, 0.00, 0.00, udg_K2DMaxDestRadius, udg_K2DMaxDestRadius)
          Else - Actions
        Set VariableSet Knockback2DDestRadius = Knockback2DDefaultDestRadius
      Else - Actions
    -------- --------
    Set VariableSet K2DAmphibious[UDex] = Knockback2DAmphibious
    Set VariableSet K2DBounce[UDex] = Knockback2DBounces
    Set VariableSet K2DCollision[UDex] = Knockback2DCollision
    Set VariableSet K2DFreeze[UDex] = False
    Set VariableSet K2DFXModel[UDex] = Knockback2DLoopFX
    Set VariableSet K2DFXRate[UDex] = Knockback2DFXRate
    Set VariableSet K2DFXTimeLeft[UDex] = Knockback2DFXRate
    Set VariableSet K2DImpact[UDex] = Knockback2DOnImpact
    Set VariableSet K2DOverride[UDex] = Knockback2DOverride
    Set VariableSet K2DPause[UDex] = Knockback2DPause
    Set VariableSet K2DSimple[UDex] = Knockback2DSimple
    Set VariableSet K2DSource[UDex] = Knockback2DSource
    Set VariableSet K2DTimeLeft[UDex] = Knockback2DTime
    Set VariableSet K2DUnbiasedCollision[UDex] = Knockback2DUnbiasedCollision
    Set VariableSet Knockback2DAmphibious = False
    Set VariableSet Knockback2DBounces = Knockback2DDefaultBounce
    Set VariableSet Knockback2DCollision = 0.00
    Set VariableSet Knockback2DFriction = Knockback2DDefaultFriction
    Set VariableSet Knockback2DFXRate = Knockback2DDefaultFXRate
    Set VariableSet Knockback2DGravity = Knockback2DDefaultGravity
    Set VariableSet Knockback2DKillTrees = Knockback2DDefaultKillTrees
    Set VariableSet Knockback2DLoopFX = Knockback2DDefaultFX
    Custom script: set udg_Knockback2DOnImpact = null
    Set VariableSet Knockback2DOverride = False
    Set VariableSet Knockback2DPause = Knockback2DDefaultPause
    Set VariableSet Knockback2DSimple = False
    Set VariableSet Knockback2DSource = No unit
    Set VariableSet Knockback2DUnbiasedCollision = False
    Custom script: set udg_UDex = pdex
//TESH.scrollpos=0
//TESH.alwaysfold=0
function K2DItemCheckXY takes real x, real y returns boolean
    call SetItemPosition(udg_K2DItem, x, y)
    return GetWidgetX(udg_K2DItem) == x and GetWidgetY(udg_K2DItem) == y
endfunction

function K2DItemCheckAxis takes real x, real y returns boolean
    local real x2 = x*udg_K2DRadius[udg_UDex]
    local real y2 = y*udg_K2DRadius[udg_UDex]
    set x = udg_K2DX + x2
    set y = udg_K2DY + y2
    if K2DItemCheckXY(x, y) and not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY) then
        set x = udg_K2DX - x2
        set y = udg_K2DY - y2
        return K2DItemCheckXY(x, y) and not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY)
    endif
    return false
endfunction

function K2DItemCheck takes nothing returns boolean
    local boolean result = K2DItemCheckXY(udg_K2DX, udg_K2DY)
   
    //Only perform additional pathing checks if the unit has a larger collision.
    if result and udg_Knockback2DRobustPathing > 0 and udg_K2DRadius[udg_UDex] > 0 then

        //Check horizontal axis of unit to make sure nothing is going to collide
        set result = K2DItemCheckAxis(udg_K2DCosH[udg_UDex], udg_K2DSinH[udg_UDex])
       
        //Check vertical axis of unit to ensure nothing will collide
        set result = result and K2DItemCheckAxis(udg_K2DCos[udg_UDex], udg_K2DSin[udg_UDex])
       
        if result and udg_Knockback2DRobustPathing == 2 and udg_K2DRadius[udg_UDex] > 16 then

            //Check diagonal axis of unit if more thorough pathing is desired
            set result = K2DItemCheckAxis(udg_K2DCosD1[udg_UDex], udg_K2DSinD1[udg_UDex])
            set result = result and K2DItemCheckAxis(udg_K2DCosD2[udg_UDex], udg_K2DSinD2[udg_UDex])
        endif
    endif
   
    //Reset item so it won't interfere with the map
    call SetItemPosition(udg_K2DItem, udg_K2DMaxX, udg_K2DMaxY)
    call SetItemVisible(udg_K2DItem, false)
   
    return result
endfunction

function K2DItemFilter takes nothing returns boolean
    //Check for visible items, temporarily hide them and add them to the filter.
    if IsItemVisible(GetFilterItem()) then
        call SetItemVisible(GetFilterItem(), false)
        return true
    endif
    return false
endfunction
function K2DItemCode takes nothing returns nothing
    //Perform the item-pathing check only once, then unhide those filtered items
    if not udg_K2DItemsFound then
        set udg_K2DItemsFound = true
        set udg_K2DItemOffset = K2DItemCheck()
    endif
    call SetItemVisible(GetEnumItem(), true)
endfunction

function K2DKillDest takes nothing returns nothing
    local real x
    local real y
    //Handle destruction of debris
    set bj_destRandomCurrentPick = GetEnumDestructable()
    if GetWidgetLife(bj_destRandomCurrentPick) > 0.405 and IssueTargetOrder(udg_K2DDebrisKiller, udg_Knockback2DTreeOrDebris, bj_destRandomCurrentPick) then
        set x = GetWidgetX(bj_destRandomCurrentPick) - udg_K2DX
        set y = GetWidgetY(bj_destRandomCurrentPick) - udg_K2DY
        if x*x + y*y <= udg_K2DDestRadius[udg_UDex] then
            call KillDestructable(bj_destRandomCurrentPick)
        endif
    endif
endfunction

function K2DEnumDests takes nothing returns nothing
    call MoveRectTo(udg_K2DRegion, udg_K2DX, udg_K2DY)
    if udg_K2DKillTrees[udg_UDex] then
        call SetUnitX(udg_K2DDebrisKiller, udg_K2DX)
        call SetUnitY(udg_K2DDebrisKiller, udg_K2DY)
        call EnumDestructablesInRect(udg_K2DRegion, null, function K2DKillDest)
    endif
endfunction

function Knockback2DCheckXY takes real x, real y returns boolean
    set udg_K2DX = x + udg_K2DVelocity[udg_UDex]*udg_K2DCos[udg_UDex]
    set udg_K2DY = y + udg_K2DVelocity[udg_UDex]*udg_K2DSin[udg_UDex]
    if udg_K2DSimple[udg_UDex] then
        //A "pull" effect or a missile system does not require complex pathing.
        if udg_K2DX <= udg_K2DMaxX and udg_K2DX >= udg_K2DMinX and udg_K2DY <= udg_K2DMaxY and udg_K2DY >= udg_K2DMinY then
            call K2DEnumDests()
            return true
        endif
        return false
    elseif udg_K2DFlying[udg_UDex] then
        return not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_FLYABILITY)
    elseif not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_WALKABILITY) then
        call K2DEnumDests()
        set udg_K2DItemOffset = false
        call EnumItemsInRect(udg_K2DRegion, Filter(function K2DItemFilter), function K2DItemCode)
        if udg_K2DItemsFound then
            //If items were found, the check was already performed.
            set udg_K2DItemsFound = false
        else
            //Otherwise, perform the check right now.
            set udg_K2DItemOffset = K2DItemCheck()
        endif
        return udg_K2DItemOffset
    endif
    return udg_K2DAmphibious[udg_UDex] and not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_FLOATABILITY)
endfunction

function Knockback2DApplyAngle takes real angle returns nothing
    set angle = ModuloReal(angle, udg_Radians_Turn)
    set udg_K2DCos[udg_UDex] = Cos(angle)
    set udg_K2DSin[udg_UDex] = Sin(angle)
    set udg_K2DAngle[udg_UDex] = angle
    if udg_Knockback2DRobustPathing > 0 then
        set angle = ModuloReal(angle + udg_Radians_QuarterTurn, udg_Radians_Turn)
        set udg_K2DCosH[udg_UDex] = Cos(angle)
        set udg_K2DSinH[udg_UDex] = Sin(angle)
        if udg_Knockback2DRobustPathing == 2 and udg_K2DRadius[udg_UDex] > 16 then
            set angle = ModuloReal(angle + udg_Radians_QuarterPi, udg_Radians_Turn)
            set udg_K2DCosD1[udg_UDex] = Cos(angle)
            set udg_K2DSinD1[udg_UDex] = Sin(angle)
            set angle = ModuloReal(angle + udg_Radians_QuarterTurn, udg_Radians_Turn)
            set udg_K2DCosD2[udg_UDex] = Cos(angle)
            set udg_K2DSinD2[udg_UDex] = Sin(angle)
        endif
    endif
endfunction

function Knockback2DLooper takes nothing returns nothing
    local integer i = 0
    local unit u
    local real x
    local real y
   
    call PauseUnit(udg_K2DDebrisKiller, false)
   
    loop
        set i = udg_K2DNext[i]
        exitwhen i == 0
        set udg_UDex = i
        set udg_K2DTimeLeft[i] = udg_K2DTimeLeft[i] - udg_K2DTimeout
        set udg_K2DDistanceLeft[i] = udg_K2DDistanceLeft[i] - udg_K2DVelocity[i]
        set u = udg_UDexUnits[i]
       
        if udg_K2DTimeLeft[i] > 0.00 then
            if udg_K2DTimeLeft[i] < udg_K2DHeightThreshold[i] and udg_K2DHeightThreshold[i] != 0.00 then
                call SetUnitFlyHeight(u, GetUnitDefaultFlyHeight(u), GetUnitFlyHeight(u) - GetUnitDefaultFlyHeight(u)/udg_K2DHeightThreshold[i])
                set udg_K2DHeightThreshold[i] = 0.00
            endif
            if udg_K2DPause[i] then
                set x = udg_K2DLastX[i]
                set y = udg_K2DLastY[i]
            else
                set x = GetUnitX(u)
                set y = GetUnitY(u)
            endif
           
            if not Knockback2DCheckXY(x, y) then
                if not udg_K2DFreeze[i] and IsTriggerEnabled(udg_K2DImpact[i]) and TriggerEvaluate(udg_K2DImpact[i]) then
                    call TriggerExecute(udg_K2DImpact[i])
                endif
                if udg_K2DBounce[i] then
                    call Knockback2DApplyAngle(udg_Radians_Turn - udg_K2DAngle[i])
                    if not Knockback2DCheckXY(x, y) then
                        call Knockback2DApplyAngle(udg_K2DAngle[i] + bj_PI)
                        if not Knockback2DCheckXY(x, y) then
                            call Knockback2DApplyAngle(udg_Radians_Turn - udg_K2DAngle[i])
                            set udg_K2DX = x
                            set udg_K2DY = y
                        endif
                    endif
                else
                    set udg_K2DX = x
                    set udg_K2DY = y
                    set udg_K2DFreeze[i] = true
                endif
            endif
            call SetUnitX(u, udg_K2DX)
            call SetUnitY(u, udg_K2DY)
            set udg_K2DLastX[i] = udg_K2DX
            set udg_K2DLastY[i] = udg_K2DY
            if udg_K2DFXModel[i] != "" then
                set udg_K2DFXTimeLeft[i] = udg_K2DFXTimeLeft[i] - udg_K2DTimeout
                if udg_K2DFXTimeLeft[i] <= 0.00 then
                    set udg_K2DFXTimeLeft[i] = udg_K2DFXRate[i]
                    if udg_K2DFlying[i] then
                        call DestroyEffect(AddSpecialEffectTarget(udg_K2DFXModel[i], u, "origin"))
                    else
                        call DestroyEffect(AddSpecialEffect(udg_K2DFXModel[i], udg_K2DX, udg_K2DY))
                    endif
                endif
            endif
            if udg_K2DCollision[i] >= 0.00 then
                call GroupEnumUnitsInRange(bj_lastCreatedGroup, udg_K2DX, udg_K2DY, 200.00, null)
                call GroupRemoveUnit(bj_lastCreatedGroup, u)
                loop
                    set udg_Knockback2DUnit = FirstOfGroup(bj_lastCreatedGroup)
                    exitwhen udg_Knockback2DUnit == null
                    call GroupRemoveUnit(bj_lastCreatedGroup, udg_Knockback2DUnit)
                   
                    if IsUnitInRange(udg_Knockback2DUnit, u, udg_K2DCollision[i]) and udg_K2DFlying[i] == IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_FLYING) and (not IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_STRUCTURE)) and not IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_DEAD) and (udg_K2DUnbiasedCollision[i] or IsUnitAlly(udg_Knockback2DUnit, GetOwningPlayer(u))) and TriggerEvaluate(gg_trg_Knockback_2D) then
                        set udg_Knockback2DAngle = bj_RADTODEG * Atan2(GetUnitY(udg_Knockback2DUnit) - udg_K2DY, GetUnitX(udg_Knockback2DUnit) - udg_K2DX)
                        set udg_Knockback2DDistance = udg_K2DDistanceLeft[i]
                        set udg_Knockback2DBounces = udg_K2DBounce[i]
                        set udg_Knockback2DCollision = udg_K2DCollision[i]
                        if udg_K2DHeight[i] != 0.00 then
                            set udg_Knockback2DHeight = GetUnitFlyHeight(u) - GetUnitDefaultFlyHeight(u)
                        endif
                        set udg_Knockback2DLoopFX = udg_K2DFXModel[i]
                        set udg_Knockback2DTime = udg_K2DTimeLeft[i]
                        set udg_Knockback2DUnbiasedCollision = udg_K2DUnbiasedCollision[i]
                        call TriggerExecute(gg_trg_Knockback_2D)
                    endif
                endloop
            endif
            set udg_K2DVelocity[i] = udg_K2DVelocity[i] - udg_K2DFriction[i]
        else
            call TriggerExecute(gg_trg_Knockback_2D_Destroy)
        endif
    endloop
    set u = null
   
    //Disable dummy after the loop finishes so it doesn't interfere with the map
    call PauseUnit(udg_K2DDebrisKiller, true)
endfunction

//===========================================================================
function StartKnockback2DTimer takes nothing returns nothing
    call TimerStart(udg_K2DTimer, udg_K2DTimeout, true, function Knockback2DLooper)
endfunction
function InitTrig_Knockback_2D_System takes nothing returns nothing
endfunction
Using the event K2DTimer expires ensures your onLoop triggers only run when a knockback is running.
K2D OnLoop Template
  Events
    Time - K2DTimer expires
  Conditions
  Actions
    Set VariableSet LoopInt = K2DNext[0]
    Custom script: loop
    Custom script: exitwhen udg_LoopInt == 0
    -------- --------
    -------- Put your stuff that you want to happen every K2DTimeout seconds here. To reference the knocked back unit, use UDexUnits[LoopInt] --------
    -------- --------
    Set VariableSet LoopInt = K2DNext[LoopInt]
    Custom script: endloop
//TESH.scrollpos=0
//TESH.alwaysfold=0
/*
    Meteor Strike
    v2.01
    by KILLCIDE
 
    Did my absolute best to not make this similar to the Chaos Meteor from DotA D:
 
    Requirements:
    --------
 
        - Check Walkability
        - dummy.mdx
        - GUI Knockback 2D
        - GUI Unit Indexer
 
    Credits:
    -------
       
        - Bribe for GUI Knockback 2D & GUI Unit Indexer
        - PurgeandFire for Check Walkability
        - Vexorian for the dummy.mdx
       
    How to Install:
    --------------
 
         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 Meteor Strike folder into your map
         5. Go to the MS Config trigger, and change the Ability, AbilityStun, & Dummy variables to the corresponding objects you just imported
   
    Changelog:
    ---------
       
        - v2.01 (March 22, 2016):    Added an optional Meteor Strike folder that is integrated with GUI Spell System
                                     Added Bribe's new knockback system update
                                     Fixed bug of meteor falling at a completely different location when casted directly on top of the caster
                                     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 25, 2016):  Added a filter for air units (both knockback and damage)
                                     Changed data structure to linked listing
       
        - v1.03 (December 05, 2015): Changed spell to now use one global dummy caster instead of one dummy caster per spell instance
                                     Changed RollDirection to now be indexed with spell instance
                                     Removed a lot of unnecessary calculations for FallRate and MoveRate (now done on init)
       
        - v1.02 (December 03, 2015): Added multi-level support for rolling travel time & SFXRoll frequency
                                     Changed MS Init trigger name to MS Cast
                                     Fixed Owner[] variable to now use Triggering Player instead of Owner of (Unit)
                                     Fixed a small bug where dummies for SFXFall were not being removed
                                     Fixed Create a Unit functions to now reference MS_Dummy instead of actual dummy unit-type
                                     Fixed self-made tree destroy system to be much safer by adding harvest ability to the created treeKiller
                                     Removed Damage[] variable so that calculations are now done on map init instead of on cast
                                     Removed unnecessary function call when turning off MS Loop (Turn off (This trigger) -> (Turn off MS Loop))
                                     
        - v1.01 (December 02, 2015): Added Bribe's new knockback system update
                                     Added a landing damage mechanic
                                     Removed damage interval mechanic; spell now deals damage constantly as it rolls
   
        - v1.00 (December 01, 2015): Uploaded onto Hive

MS Config
  Events
    Map initialization
  Conditions
  Actions
    -------- !! CONFIG START !! --------
    -------- Abilities and Dummies --------
    Set VariableSet MS_Ability = Meteor Strike
    -------- Stun Ability --------
    -------- NOTE: If you want to edit the stun duration and or damage of the meteor death, refer to this ability --------
    Set VariableSet MS_AbilityStun = Meteor Strike (Stun)
    Set VariableSet MS_Dummy = Dummy
    -------- --------
    -------- Max Level MS_Ability Will Have --------
    -------- NOTE: THIS IS REALLY IMPORTANT IF YOU WANT DAMAGE & ROLL EFFECTS TO WORK PROPERLY --------
    Set VariableSet MS_MaxLevel = 3
    -------- --------
    -------- Damage When Meteor Lands --------
    Set VariableSet MS_LandingDamage = 1000.00
    -------- Radius to Deal LandingDamage --------
    Set VariableSet MS_LandAoE = 200.00
    -------- --------
    -------- Damage Per Second Per Level --------
    Set VariableSet MS_Damage[1] = 250.00
    Set VariableSet MS_Damage[2] = 550.00
    Set VariableSet MS_Damage[3] = 980.00
    -------- Radius to Deal Damage --------
    -------- NOTE: Make sure to match the Area of Effect values in MS_Ability --------
    Set VariableSet MS_AoE = 175.00
    -------- --------
    -------- Roll Distance Per Level --------
    Set VariableSet MS_RollDistance[1] = 500.00
    Set VariableSet MS_RollDistance[2] = 650.00
    Set VariableSet MS_RollDistance[3] = 750.00
    -------- Roll Length Per Level --------
    Set VariableSet MS_RollTime[1] = 2.25
    Set VariableSet MS_RollTime[2] = 2.75
    Set VariableSet MS_RollTime[3] = 3.25
    -------- --------
    -------- Radius to Stun When Meteor Ends --------
    Set VariableSet MS_StunAoE = 250.00
    -------- --------
    -------- Meteor Spawn Location --------
    Set VariableSet MS_M_SpawnHeight = 1100.00
    Set VariableSet MS_M_SpawnDistance = 600.00
    Set VariableSet MS_FallTime = 1.75
    -------- --------
    -------- Should the Meteor Kill Trees? --------
    Set VariableSet MS_DestroyTrees = True
    -------- Radius To Kill Trees --------
    Set VariableSet MS_DestroyTreeAoE = 150.00
    -------- --------
    -------- Knockback Stuff --------
    Set VariableSet MS_KBDistance = 150.00
    Set VariableSet MS_KBAoE = 132.00
    Set VariableSet MS_KBTime = 1.50
    Set VariableSet MS_SFXKB = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
    -------- --------
    -------- Special Effect for Meteor --------
    Set VariableSet MS_SFXMeteor = Abilities\Weapons\BallsOfFireMissile\BallsOfFireMissile.mdl
    Set VariableSet MS_Size = 5.00
    -------- Vertex Color of Meteor --------
    -------- NOTE: Max value for each is 100 --------
    Set VariableSet MS_Red = 100.00
    Set VariableSet MS_Green = 0.00
    Set VariableSet MS_Blue = 0.00
    -------- --------
    -------- Special Effect for Falling --------
    Set VariableSet MS_SFXFall = Abilities\Weapons\BrewmasterMissile\BrewmasterMissile.mdl
    -------- Frequency for SFXFall --------
    Set VariableSet MS_SFX_FallFreq = 0.15
    -------- --------
    -------- Special Effect for Landing --------
    Set VariableSet MS_SFXLand = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
    -------- --------
    -------- Special Effect for Roll --------
    Set VariableSet MS_SFXRoll = Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
    -------- Frequency for SFXRoll Per Level --------
    Set VariableSet MS_SFX_RollFreq[1] = 0.85
    Set VariableSet MS_SFX_RollFreq[2] = 0.80
    Set VariableSet MS_SFX_RollFreq[3] = 0.70
    -------- --------
    -------- Special Effect for Meteor Death --------
    Set VariableSet MS_SFXDeath = Abilities\Weapons\DemolisherFireMissile\DemolisherFireMissile.mdl
    -------- --------
    -------- Other Damage Configurables --------
    Set VariableSet MS_AttackType = Spells
    Set VariableSet MS_DamageType = Normal
    -------- !! CONFIG END !! --------
    -------- --------
    Set VariableSet MS_PeriodicTimer = 0.03
    Trigger - Add to MS_Loop <gen> the event (Every MS_PeriodicTimer seconds of game time)
    Set VariableSet MS_TempLoc = (Center of (Playable map area))
    Unit - Create 1.MS_Dummy for Neutral Passive at MS_TempLoc facing Default building facing degrees
    Set VariableSet MS_DummyCaster = (Last created unit)
    Unit - Add MS_AbilityStun to MS_DummyCaster
    Custom script: call UnitRemoveAbility(udg_MS_DummyCaster, 'Amov')
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MS_DestroyTrees Equal to True
      Then - Actions
        Unit - Create 1.Madara Statue for Neutral Passive at MS_TempLoc facing Default building facing degrees
        Set VariableSet MS_TreeKiller = (Last created unit)
        Unit - Hide MS_TreeKiller
        Unit - Make MS_TreeKiller Invulnerable
        Custom script: call UnitAddAbility(udg_MS_TreeKiller, 'Ahrl')
      Else - Actions
        -------- user does not want to kill trees --------
    Custom script: call RemoveLocation(udg_MS_TempLoc)
    Set VariableSet MS_MeteorSize = (100.00 x MS_Size)
    Set VariableSet MS_FallRate_XY = (MS_M_SpawnDistance / (MS_FallTime / MS_PeriodicTimer))
    Set VariableSet MS_FallRate_Z = (MS_M_SpawnHeight / (MS_FallTime / MS_PeriodicTimer))
    For each (Integer MS_TempInt) from 1 to MS_MaxLevel, do (Actions)
      Loop - Actions
        Set VariableSet MS_Damage[MS_TempInt] = (MS_Damage[MS_TempInt] x MS_PeriodicTimer)
        Set VariableSet MS_MoveRate[MS_TempInt] = (MS_RollDistance[MS_TempInt] / (MS_RollTime[MS_TempInt] / MS_PeriodicTimer))
MS Cast
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to MS_Ability
  Actions
    Set VariableSet MS_SpellCount = (MS_SpellCount + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        MS_SpellCount Equal to 1
      Then - Actions
        Trigger - Turn on MS_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
      Then - Actions
        Set VariableSet MS_MaxIndex = (MS_MaxIndex + 1)
        Set VariableSet MS_Spell_ID = MS_MaxIndex
      Else - Actions
        Set VariableSet MS_RecycledSize = (MS_RecycledSize - 1)
        Set VariableSet MS_Spell_ID = MS_RecycledStack[MS_RecycledSize]
    Set VariableSet MS_NodeNext[MS_Spell_ID] = 0
    Set VariableSet MS_NodeNext[MS_NodePrev[0]] = MS_Spell_ID
    Set VariableSet MS_NodePrev[MS_Spell_ID] = MS_NodePrev[0]
    Set VariableSet MS_NodePrev[0] = MS_Spell_ID
    -------- --------
    Set VariableSet MS_Caster[MS_Spell_ID] = (Triggering unit)
    Set VariableSet MS_AbilityLvl[MS_Spell_ID] = (Level of MS_Ability for MS_Caster[MS_Spell_ID])
    Set VariableSet MS_Owner[MS_Spell_ID] = (Triggering player)
    Set VariableSet MS_TargetLoc[MS_Spell_ID] = (Target point of ability being cast)
    Set VariableSet MS_DistanceTraveled[MS_Spell_ID] = 0.00
    Set VariableSet MS_Counter_SFX[MS_Spell_ID] = 0.00
    Set VariableSet MS_Stage[MS_Spell_ID] = 1
    -------- --------
    Set VariableSet MS_TempLoc = (Position of MS_Caster[MS_Spell_ID])
    Set VariableSet MS_RollDirection[MS_Spell_ID] = (Angle from MS_TempLoc to MS_TargetLoc[MS_Spell_ID])
    Set VariableSet MS_TempReal = (MS_RollDirection[MS_Spell_ID] + 180.00)
    Set VariableSet MS_MeteorLoc = (MS_TargetLoc[MS_Spell_ID] offset by MS_M_SpawnDistance towards MS_TempReal degrees.)
    -------- --------
    Unit - Create 1.MS_Dummy for MS_Owner[MS_Spell_ID] at MS_MeteorLoc facing MS_RollDirection[MS_Spell_ID] degrees
    Set VariableSet MS_MeteorDummy[MS_Spell_ID] = (Last created unit)
    Animation - Change MS_MeteorDummy[MS_Spell_ID] flying height to MS_M_SpawnHeight at 0.00
    Animation - Change MS_MeteorDummy[MS_Spell_ID]'s size to (MS_MeteorSize%, MS_MeteorSize%, MS_MeteorSize%) of its original size
    Animation - Change MS_MeteorDummy[MS_Spell_ID]'s vertex coloring to (MS_Red%, MS_Green%, MS_Blue%) with 0% transparency
    Special Effect - Create a special effect attached to the origin (attachpoint) of MS_MeteorDummy[MS_Spell_ID] using MS_SFXMeteor
    Set VariableSet MS_Meteor_SFX[MS_Spell_ID] = (Last created special effect)
    -------- --------
    Custom script: call RemoveLocation(udg_MS_TempLoc)
    Custom script: call RemoveLocation(udg_MS_MeteorLoc)
MS Loop
  Events
  Conditions
  Actions
    Set VariableSet MS_Spell_ID = 0
    For each (Integer MS_LoopInt) from 1 to MS_SpellCount, do (Actions)
      Loop - Actions
        Set VariableSet MS_Spell_ID = MS_NodeNext[MS_Spell_ID]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            MS_Stage[MS_Spell_ID] Equal to 1
          Then - Actions
            Set VariableSet MS_Counter_SFX[MS_Spell_ID] = (MS_Counter_SFX[MS_Spell_ID] + MS_PeriodicTimer)
            -------- --------
            -------- XY adjustment --------
            Set VariableSet MS_TempLoc = (Position of MS_MeteorDummy[MS_Spell_ID])
            Set VariableSet MS_MeteorLoc = (MS_TempLoc offset by MS_FallRate_XY towards MS_RollDirection[MS_Spell_ID] degrees.)
            -------- Z adjustment --------
            Set VariableSet MS_TempHeight = (Current flying height of MS_MeteorDummy[MS_Spell_ID])
            Set VariableSet MS_CurrentHeight = (MS_TempHeight - MS_FallRate_Z)
            -------- apply adjustment --------
            Unit - Move MS_MeteorDummy[MS_Spell_ID] instantly to MS_MeteorLoc
            Animation - Change MS_MeteorDummy[MS_Spell_ID] flying height to MS_CurrentHeight at 0.00
            Set VariableSet MS_DistanceTraveled[MS_Spell_ID] = (MS_DistanceTraveled[MS_Spell_ID] + MS_FallRate_XY)
            -------- --------
            -------- checking if it is time to show SFXFall --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                MS_Counter_SFX[MS_Spell_ID] Greater than or equal to MS_SFX_FallFreq
              Then - Actions
                Set VariableSet MS_Counter_SFX[MS_Spell_ID] = 0.00
                Unit - Create 1.MS_Dummy for MS_Owner[MS_Spell_ID] at MS_MeteorLoc facing Default building facing degrees
                Set VariableSet MS_TempUnit = (Last created unit)
                Unit - Add a 1.00 second Generic expiration timer to MS_TempUnit
                Animation - Change MS_TempUnit flying height to (MS_TempHeight - 100.00) at 0.00
                Special Effect - Create a special effect attached to the origin (attachpoint) of MS_TempUnit using MS_SFXFall
                Special Effect - Destroy (Last created special effect)
              Else - Actions
                -------- it is not time to show SFXFall; do nothing --------
            -------- checking if meteor has reached ground height --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                MS_DistanceTraveled[MS_Spell_ID] Greater than or equal to MS_M_SpawnDistance
              Then - Actions
                Special Effect - Create a special effect at MS_MeteorLoc using MS_SFXLand
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect at MS_MeteorLoc using MS_SFXRoll
                Special Effect - Destroy (Last created special effect)
                -------- dealing damage to units around landing area --------
                Custom script: set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units within MS_LandAoE of MS_TargetLoc[MS_Spell_ID].) and do (Actions)
                  Loop - Actions
                    Set VariableSet MS_TempUnit = (Picked unit)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (MS_TempUnit belongs to an enemy of MS_Owner[MS_Spell_ID].) Equal to True
                        (MS_TempUnit is alive) Equal to True
                        (MS_TempUnit is Magic Immune) Equal to False
                      Then - Actions
                        Unit - Cause MS_Caster[MS_Spell_ID] to damage MS_TempUnit, dealing MS_LandingDamage damage of attack type MS_AttackType and damage type MS_DamageType
                      Else - Actions
                        -------- TempUnit did not pass filters; do not deal damage --------
                Set VariableSet MS_Counter_SFX[MS_Spell_ID] = 0.00
                Set VariableSet MS_DistanceTraveled[MS_Spell_ID] = 0.00
                Set VariableSet MS_Stage[MS_Spell_ID] = 2
                Custom script: call RemoveLocation(udg_MS_TargetLoc[udg_MS_Spell_ID])
              Else - Actions
                -------- meteor is still falling; do not start roll phase --------
            Custom script: call RemoveLocation(udg_MS_TempLoc)
            Custom script: call RemoveLocation(udg_MS_MeteorLoc)
          Else - Actions
            -------- XY adjustment --------
            Set VariableSet MS_MeteorLoc = (Position of MS_MeteorDummy[MS_Spell_ID])
            Set VariableSet CP_Point = (MS_MeteorLoc offset by MS_MoveRate[MS_AbilityLvl[MS_Spell_ID]] towards MS_RollDirection[MS_Spell_ID] degrees.)
            Set VariableSet MS_DistanceTraveled[MS_Spell_ID] = (MS_DistanceTraveled[MS_Spell_ID] + MS_MoveRate[MS_AbilityLvl[MS_Spell_ID]])
            -------- --------
            -------- checking if user wants to destroy trees --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                MS_DestroyTrees Equal to True
              Then - Actions
                Destructible - Pick every destructible within MS_DestroyTreeAoE of CP_Point and do (Actions)
                  Loop - Actions
                    Set VariableSet MS_TempDest = (Picked destructible)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (MS_TempDest is alive) Equal to True
                      Then - Actions
                        Unit - Order MS_TreeKiller to Harvest.MS_TempDest
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            (Current order of MS_TreeKiller) Equal to (Order(harvest))
                          Then - Actions
                            Destructible - Kill MS_TempDest
                          Else - Actions
                            -------- TempDest is not a tree; do not kill --------
                      Else - Actions
                        -------- TempDest is already dead --------
                    Unit - Order MS_TreeKiller to Stop.
              Else - Actions
                -------- user does not want to kill trees --------
            -------- checking if path ahead is pathable for meteor --------
            Trigger - Run Check_Walkability <gen> (ignoring conditions)
            -------- checking if meteor has not hit terrain or still has distance to roll --------
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    CP_PointIsWalkable Equal to False
                    MS_DistanceTraveled[MS_Spell_ID] Greater than or equal to MS_RollDistance[MS_AbilityLvl[MS_Spell_ID]]
              Then - Actions
                Special Effect - Destroy MS_Meteor_SFX[MS_Spell_ID]
                Unit - Remove MS_MeteorDummy[MS_Spell_ID] from the game
                Special Effect - Create a special effect at CP_Point using MS_SFXRoll
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect at CP_Point using MS_SFXDeath
                Special Effect - Destroy (Last created special effect)
                -------- --------
                Unit - Change ownership of MS_DummyCaster to MS_Owner[MS_Spell_ID] and Change color
                Unit - Set level of MS_AbilityStun for MS_DummyCaster to MS_AbilityLvl[MS_Spell_ID]
                -------- stunning enemy units and damaging structures --------
                Custom script: set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units within MS_StunAoE of CP_Point.) and do (Actions)
                  Loop - Actions
                    Set VariableSet MS_TempUnit = (Picked unit)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (MS_TempUnit is Magic Immune) Equal to False
                        (MS_TempUnit is alive) Equal to True
                        (MS_TempUnit belongs to an enemy of MS_Owner[MS_Spell_ID].) Equal to True
                      Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            (MS_TempUnit is A structure) Equal to False
                          Then - Actions
                            Set VariableSet MS_TempLoc = (Position of MS_TempUnit)
                            Unit - Move MS_DummyCaster instantly to MS_TempLoc
                            Unit - Order MS_DummyCaster to Human Mountain King - Storm Bolt.MS_TempUnit
                            Custom script: call RemoveLocation(udg_MS_TempLoc)
                          Else - Actions
                            Unit - Cause MS_Caster[MS_Spell_ID] to damage MS_TempUnit, dealing MS_Damage[MS_AbilityLvl[MS_Spell_ID]] damage of attack type MS_AttackType and damage type MS_DamageType
                      Else - Actions
                        -------- TempUnit did not pass filters; do not stun --------
                -------- --------
                Set VariableSet MS_RecycledStack[MS_RecycledSize] = MS_Spell_ID
                Set VariableSet MS_RecycledSize = (MS_RecycledSize + 1)
                Set VariableSet MS_NodeNext[MS_NodePrev[MS_Spell_ID]] = MS_NodeNext[MS_Spell_ID]
                Set VariableSet MS_NodePrev[MS_NodeNext[MS_Spell_ID]] = MS_NodePrev[MS_Spell_ID]
                -------- --------
                Set VariableSet MS_SpellCount = (MS_SpellCount - 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    MS_SpellCount Equal to 0
                  Then - Actions
                    Trigger - Turn off MS_Loop <gen>
                  Else - Actions
                    -------- there is a spell instance still running; do not turn off loop --------
              Else - Actions
                Set VariableSet MS_Counter_SFX[MS_Spell_ID] = (MS_Counter_SFX[MS_Spell_ID] + MS_PeriodicTimer)
                Unit - Move MS_MeteorDummy[MS_Spell_ID] instantly to CP_Point
                -------- --------
                -------- dealing damage per second and applying knockback --------
                Custom script: set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units within MS_AoE of CP_Point.) and do (Actions)
                  Loop - Actions
                    Set VariableSet MS_TempUnit = (Picked unit)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (MS_TempUnit is A flying unit) Equal to False
                        (MS_TempUnit is Magic Immune) Equal to False
                        (MS_TempUnit is alive) Equal to True
                        (MS_TempUnit belongs to an enemy of MS_Owner[MS_Spell_ID].) Equal to True
                      Then - Actions
                        Unit - Cause MS_Caster[MS_Spell_ID] to damage MS_TempUnit, dealing MS_Damage[MS_AbilityLvl[MS_Spell_ID]] damage of attack type MS_AttackType and damage type MS_DamageType
                      Else - Actions
                        -------- TempUnit did not pass filters; do not deal damage --------
                Custom script: set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units within MS_KBAoE of CP_Point.) and do (Actions)
                  Loop - Actions
                    Set VariableSet MS_TempUnit = (Picked unit)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (MS_TempUnit is A structure) Equal to False
                        (MS_TempUnit is A flying unit) Equal to False
                        (MS_TempUnit is alive) Equal to True
                        (MS_TempUnit belongs to an enemy of MS_Owner[MS_Spell_ID].) Equal to True
                      Then - Actions
                        Set VariableSet MS_TempLoc = (Position of MS_TempUnit)
                        Set VariableSet Knockback2DAngle = (Angle from MS_MeteorLoc to MS_TempLoc)
                        Set VariableSet Knockback2DTime = MS_KBTime
                        Set VariableSet Knockback2DDistance = MS_KBDistance
                        Set VariableSet Knockback2DUnit = MS_TempUnit
                        Set VariableSet Knockback2DLoopFX = MS_SFXKB
                        Set VariableSet Knockback2DPause = True
                        Custom script: call RemoveLocation(udg_MS_TempLoc)
                        Trigger - Run Knockback_2D <gen> (checking conditions)
                      Else - Actions
                        -------- TempUnit did not pass filters; do not knockback --------
                -------- --------
                -------- checking if it is time to show SFXRoll --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    MS_Counter_SFX[MS_Spell_ID] Greater than or equal to MS_SFX_RollFreq[MS_AbilityLvl[MS_Spell_ID]]
                  Then - Actions
                    Set VariableSet MS_Counter_SFX[MS_Spell_ID] = 0.00
                    Special Effect - Create a special effect at CP_Point using MS_SFXRoll
                    Special Effect - Destroy (Last created special effect)
                  Else - Actions
                    -------- it is not time to show SFXRoll; do nothing --------
            Custom script: call RemoveLocation(udg_CP_Point)
            Custom script: call RemoveLocation(udg_MS_MeteorLoc)