• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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