• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Dash Example v1.04

K Time For an Dash Spell.
Update:

Dash Spell v 1.04
- Fixed Fading Thing
- Fixed Dmg Thing


I think all know what means Dash

¥.[GUI][MUI]
¥.Leakless
¥.Bugless
¥.Fading (More or Less)


Credits:
- Shark_4_you - Spell



[trigger=Main Trigger]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dash
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DashInteger[0] Equal to 0
Then - Actions
Trigger - Turn on Spell Loop <gen>
Else - Actions
-------- ----------------------------------------------------- --------
Set DashInteger[0] = (DashInteger[0] + 1)
Set DashInteger[1] = (DashInteger[1] + 1)
-------- ----------------------------------------------------- --------
Set DashCaster[DashInteger[1]] = (Triggering unit)
-------- ----------------------------------------------------- --------
Unit - Pause DashCaster[DashInteger[1]]
-------- ----------------------------------------------------- --------
Set DashReal1[DashInteger[1]] = (Facing of DashCaster[DashInteger[1]])
-------- ----------------------------------------------------- --------
-------- -----------Configure The Spell--------------------------- --------
-------- ----------------------------------------------------- --------
Set DashDamage[DashInteger[1]] = ((Real((Level of Dash for DashCaster[DashInteger[1]]))) x 200.00)
-------- ----------------------------------------------------- --------
Set DashSpeed[DashInteger[1]] = 40.00
-------- ----------------------------------------------------- --------
-------- ----------------How Much the Caster to Dash-------------------- --------
-------- ----------------------------------------------------- --------
Set DashDistance[DashInteger[1]] = 30
-------- ----------------------------------------------------- --------
-------- ----------------How Much the Caster to Dash-------------------- --------
-------- ----------------------------------------------------- --------
-------- -------------Turn Collision off----------------------- --------
-------- ----------------------------------------------------- --------
Custom script: call SetUnitAnimationByIndex (udg_DashCaster[udg_DashInteger[1]] , 2)
Animation - Play DashCaster[DashInteger[1]]'s walk animation
Unit - Turn collision for DashCaster[DashInteger[1]] Off
-------- ----------------------------------------------------- --------


[/trigger]

[trigger=Loop Trigger]
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer DashInteger[2]) from 1 to DashInteger[1], do (Actions)
Loop - Actions
Set DashDistance[DashInteger[2]] = (DashDistance[DashInteger[2]] - 1)
-------- ----------------------------------------------------- --------
Set DashPoint3[DashInteger[2]] = (Position of DashCaster[DashInteger[2]])
Set DashPoint4[DashInteger[2]] = (DashPoint3[DashInteger[2]] offset by DashSpeed[DashInteger[2]] towards DashReal1[DashInteger[2]] degrees)
-------- ----------------------------------------------------- --------
Unit - Move DashCaster[DashInteger[2]] instantly to DashPoint4[DashInteger[2]]
-------- ----------------------------------------------------- --------
Unit - Create 1 Dash Dummy for (Owner of DashCaster[DashInteger[2]]) at DashPoint4[DashInteger[2]] facing (Facing of DashCaster[DashInteger[2]]) degrees
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to DashGroup3
Animation - Play (Last created unit)'s walk animation
-------- ----------------------------------------------------- --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in DashGroup3 and do (Actions)
Loop - Actions
Set DashPoint5[DashInteger[2]] = (Position of (Picked unit))
Set DashReal2[DashInteger[2]] = ((Distance between DashPoint3[DashInteger[2]] and DashPoint5[DashInteger[2]]) / 5.00)
Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with DashReal2[DashInteger[2]]% transparency
-------- ----------------------------------------------------- --------
Set DashGroup1 = (Units within 150.00 of DashPoint4[DashInteger[2]] matching ((((Matching unit) belongs to an enemy of (Owner of DashCaster[DashInteger[2]])) Equal to True) and (((Matching unit) is in DashGroup2) Equal to False)))
Unit Group - Pick every unit in DashGroup1 and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to DashGroup2
Unit - Cause DashCaster[DashInteger[2]] to damage (Picked unit), dealing DashDamage[DashInteger[2]] damage of attack type Spells and damage type Normal
-------- ----------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
DashDistance[DashInteger[2]] Less than or equal to 0
(Terrain pathing at DashPoint3[DashInteger[2]] of type Walkability is off) Equal to True
Then - Actions
For each (Integer DashInteger[2]) from 1 to DashInteger[1], do (Actions)
Loop - Actions
-------- ----------------------------------------------------- --------
Unit - Turn collision for DashCaster[DashInteger[2]] On
Unit - Unpause DashCaster[DashInteger[2]]
-------- ----------------------------------------------------- --------
-------- ----------------------------------------------------- --------
Set DashInteger[1] = 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DashInteger[0] Equal to 0
Then - Actions
-------- ----------------------------------------------------- --------
Set DashInteger[1] = 0
-------- ----------------------------------------------------- --------
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
-------- ----------------------------------------------------- --------
Custom script: call RemoveLocation (udg_DashPoint3[udg_DashInteger[2]])
Custom script: call RemoveLocation (udg_DashPoint4[udg_DashInteger[2]])
Custom script: call DestroyGroup (udg_DashGroup1)
-------- ----------------------------------------------------- --------


[/trigger]

This one from bellow idk if is a leak but i think is better with this trigger.

[trigger=Unit Leak Remove]
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Dying unit)) Equal to Dash Dummy
Then - Actions
Unit - Remove (Dying unit) from the game
Else - Actions
[/trigger]


Enjoy.

Keywords:
Dash Spell GUI MUI anime Dota
Contents

Advanced Dash Example (Map)

Reviews
16:46, 9th Aug 2010 hvo-busterkomo: A unit can only ever be hit once by the spell. Please fix that.Good job on fixing that. The coding doesn't seem to have anything majorly wrong with it (although the spell is somewhat cliché). Approved.

Moderator

M

Moderator

16:46, 9th Aug 2010
hvo-busterkomo:
A unit can only ever be hit once by the spell. Please fix that.Good job on fixing that.

The coding doesn't seem to have anything majorly wrong with it (although the spell is somewhat cliché). Approved.
 
Level 4
Joined
Aug 17, 2005
Messages
82
3.5/5 The looks can be fixed to look nice( I added a sfx to put dust on the unit while moving). But there are two very bad flaws
1. Goes through dodads.
2. You can jump onto cliffs using the ability next to a cliff.
 
Level 2
Joined
Apr 18, 2008
Messages
16
3.5/5 The looks can be fixed to look nice( I added a sfx to put dust on the unit while moving). But there are two very bad flaws
1. Goes through dodads.
2. You can jump onto cliffs using the ability next to a cliff.

Go Into the Trigger and Remove the " Turn Collision For DashCaster[DashInteger[1]] Off " Trigger and It will Stop Him From Passing Through Doodads.
 
Top