I need help on making a blink spell that triggers when you order your unit to move to an area, for an example if a unit has blink and was ordered to move to a tree blink would automaticly cast and move him to the tree.
Unit - A unit Is issued an order targeting a point
Conditions
(Level of Blink for (Triggering unit)) Greater than 0
Or - Any (Conditions) are true
Conditions
(Issued order) Equal to (Order(smart))
(Issued order) Equal to (Order(attack))
Actions
Set Point1 = (Position of (Triggering unit))
Set Point2 = (Target point of issued order)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Point1 and Point2) Greater than 400.00
Then - Actions
Special Effect - Create a special effect at Point1 using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at Point2 using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Move (Triggering unit) instantly to Point2
Else - Actions
Custom script: call RemoveLocation( udg_Point1 )
Custom script: call RemoveLocation( udg_Point2 )
Somewhat basic, but it works.
Assumes "blink" is a passive ability.
If you prefer the active way, replace the "unit - move" with an order to use Blink.
A more advanced passive version would check for some maximum distance, move the Hero some 200 before the end point and order him to (attack-)move the rest.
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.