• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Stop from Moving

Status
Not open for further replies.
Level 4
Joined
Sep 15, 2013
Messages
53
I have a spell in which it targets an enemy unit from 1000 distance from the caster. Now my question what if the target is farther from the distance of 1000, is there a way to stop the unit from moving closer to the enemy unit? I tried issuing stop order, but it moves first within the 1000 range then stop order triggers.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
I have a spell in which it targets an enemy unit from 1000 distance from the caster. Now my question what if the target is farther from the distance of 1000, is there a way to stop the unit from moving closer to the enemy unit? I tried issuing stop order, but it moves first within the 1000 range then stop order triggers.

This sounds like a weird thing to want, but, oh, well, let's give it a try.
Also, this should in theory work... What is your event? It should be something like "Unit - A Unit is issued an order targeting a unit". Is there such an event ?
If you are using "Starts casting" or "Starts the effect of a skill" or anything around, the unit has to get in range and start doing it's own things first to trigger this.

If there is no "Unit is issued an order" event you could do the following:
Havea dummy ability with 99999 range, hide the spell itself,
when the dummy ability is cast, you check distance, and order the spell to be cast.
You may have to hide animations somehow though... If you issue a stop-order the animations should be interrupted ?

regards
-Ned
 
Status
Not open for further replies.
Top