Couldn't post a picture, but here it is.
This spell causes the unit to dash to a certain point with the maximum range of 900, creating a blurry effect and destroying all destructables in its way.
Please post all comments. If you find any leaks, please post them here and how to fix them.
EDIT: I updated the spell.
Here's the code.
This spell causes the unit to dash to a certain point with the maximum range of 900, creating a blurry effect and destroying all destructables in its way.
Please post all comments. If you find any leaks, please post them here and how to fix them.
EDIT: I updated the spell.
Here's the code.
Code:
quick dash
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Quick Dash
Actions
Set Temp_Point = (Target point of ability being cast)
Set Temp_CasterPoint = (Position of Temp_Caster)
Set CasterTarget_Distance = (Distance between Temp_CasterPoint and Temp_Point)
Set Temp_Caster = (Triggering unit)
Unit - Create 1 Dummy for Player 1 (Red) at (Target point of ability being cast) facing (Facing of Temp_Caster) degrees
Set Temp_Dummy = (Last created unit)
Animation - Change Temp_Dummy's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Unit - Turn collision for Temp_Caster Off
Trigger - Turn on move <gen>
Custom script: call RemoveLocation (udg_Temp_Point)
Code:
move
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Movement Greater than or equal to CasterTarget_Distance
Then - Actions
Trigger - Turn off (This trigger)
Unit - Remove Temp_Dummy from the game
Unit - Turn collision for Temp_Caster On
Unit Group - Pick every unit in (Units of type Dummy) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Else - Actions
Set Movement = (Movement + 5.00)
Unit - Move Temp_Caster instantly to (Temp_CasterPoint offset by Movement towards (Facing of Temp_Caster) degrees)
Custom script: call RemoveLocation(udg_Temp_CasterPoint)
Unit - Create 1 Dummy for Player 1 (Red) at Temp_CasterPoint facing (Facing of Temp_Caster) degrees
Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Custom script: call RemoveLocation(udg_Temp_Point)
Set Temp_Point = (Position of Temp_Caster)
Custom script: call RemoveLocation (udg_Temp_CasterPoint)
Destructible - Pick every destructible within 200.00 of Temp_Point and do (Actions)
Loop - Actions
Destructible - Kill (Picked destructible)
Custom script: call RemoveLocation(udg_Temp_Point)