[trigger=Lightning Dash cast]Lightning Dash Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Dash
Actions
-------- Stores variables of Caster, Caster_Position, Caster_Target_Point, and Distance --------
Set Lightning_Dash_Caster = (Casting unit)
Set Lightning_Caster_Position = (Position of Lightning_Dash_Caster)
Set Lightning_Dash_Target_Point = (Target point of ability being cast)
Set Lightning_Dash_Distance = (Distance between Lightning_Caster_Position and Lightning_Dash_Target_Point)
-------- Turns collision Off --------
Animation - Play Lightning_Dash_Caster's attack animation
Unit - Turn collision for Lightning_Dash_Caster Off
-------- Removing the Leak --------
Custom script: call RemoveLocation(udg_Lightning_Caster_Position)
-------- Loop --------
Trigger - Turn on Lightning Dash Loop <gen>
[/trigger]
[trigger=Lightning Dash loop]
Lightning Dash Loop
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
-------- Stores variables of Caster_Position, Point Temp_Group --------
Set Lightning_Caster_Position = (Position of Lightning_Dash_Caster)
Set Lightning_Dash_Point = (Lightning_Caster_Position offset by 50.00 towards (Angle from Lightning_Caster_Position to Lightning_Dash_Target_Point) degrees)
Set Lightning_Dash_Targets = (Units within 215.00 of Lightning_Caster_Position matching (((Owner of (Matching unit)) Not equal to (Owner of Lightning_Dash_Caster)) and (((Matching unit) is alive) Equal to True)))
-------- Transparency --------
Animation - Change Lightning_Dash_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Unit Group - Pick every unit in Lightning_Dash_Targets and do (Actions)
Loop - Actions
Unit - Create 1 General Dummy for (Owner of Lightning_Dash_Caster) at Lightning_Caster_Position facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Storm Bolt to (Last created unit)
Unit - Set level of Storm Bolt for (Last created unit) to (Level of Lightning Dash for Lightning_Dash_Caster)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
Animation - Play (Picked unit)'s death animation
Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Special Effect - Destroy (Last created special effect)
-------- Special Effects -- You can change the SFX --------
Special Effect - Create a special effect at Lightning_Caster_Position using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
-------- Moves the caster towards Point --------
Unit - Move Lightning_Dash_Caster instantly to Lightning_Dash_Point
-------- Removing Leaks --------
Custom script: call RemoveLocation(udg_Lightning_Caster_Position)
Custom script: call RemoveLocation(udg_Lightning_Dash_Point)
-------- Stores Variable of Distance --------
Set Lightning_Dash_Distance = (Lightning_Dash_Distance - 50.00)
-------- If, Then, and Else --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Lightning_Dash_Distance Less than or equal to 10.00
Then - Actions
Custom script: call DisableTrigger( gg_trg_Lightning_Dash_Loop )
Custom script: call RemoveLocation(udg_Lightning_Dash_Point)
Animation - Play Lightning_Dash_Caster's stand animation
Animation - Change Lightning_Dash_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Turn collision for Lightning_Dash_Caster On
Set Lightning_Dash_Distance = 0.00
Set Lightning_Dash_Caster = No unit
Else - Actions
[/trigger]
[trigger=Blink cast]
Blink Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Thunder Blink
Actions
Unit - Create 1 Blink Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Animation - Play (Last created unit)'s attack animation
Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Unit - Turn collision for (Last created unit) Off
Wait 0.50 seconds
Special Effect - Destroy (Last created special effect)
Unit - Remove (Last created unit) from the game
Unit - Turn collision for (Last created unit) On
[/trigger]
[trigger=Ultimate Purge]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Ultimate Purge
Actions
Set UP_Caster = (Casting unit)
Set UP_Caster_Pos = (Position of UP_Caster)
Set UP_Damage = (75.00 x (Real((Level of Ultimate Purge for UP_Caster))))
Set UP_Group_Targets = (Units within 400.00 of UP_Caster_Pos matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to (Owner of UP_Caster))))
Trigger - Turn on Ultimate Purge Cast <gen>
Wait 1.00 seconds
Trigger - Turn off Ultimate Purge Cast <gen>
[/trigger]
[trigger=Ultimate Purge cast]
Ultimate Purge Cast
Events
Time - Every 0.15 seconds of game time
Conditions
Actions
Set UP_Caster_Pos = (Position of UP_Caster)
Unit - Create 1 General Dummy for (Owner of UP_Caster) at UP_Caster_Pos facing Default building facing degrees
Set UP_Dummy = (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to UP_Dummy
Set UP_Group_Targets = (Units within 215.00 of UP_Caster_Pos matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to (Owner of UP_Caster))))
Unit Group - Pick every unit in UP_Group_Targets and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
Special Effect - Destroy (Last created special effect)
Unit - Add Purge Dummy to UP_Dummy
Unit - Set level of Purge for UP_Dummy to (Level of Ultimate Purge for UP_Caster)
Unit - Order UP_Dummy to Orc Shaman - Purge (Picked unit)
Unit - Cause UP_Dummy to damage (Picked unit), dealing UP_Damage damage of attack type Spells and damage type Normal
Custom script: call RemoveLocation(udg_UP_Caster_Pos)
[/trigger]