• 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.

detecting unit movement?

Status
Not open for further replies.
Level 9
Joined
Oct 11, 2009
Messages
477
Or creating a location and a unit group will do...... This trigger must be running every 0.01 second(s).

Two locations are needed, if the distance between the two locations becomes greater than 0.00, then the unit is moving.



I hope you are getting what I want to say.
 
Level 5
Joined
Nov 25, 2004
Messages
65
Or creating a location and a unit group will do...... This trigger must be running every 0.01 second(s).

Two locations are needed, if the distance between the two locations becomes greater than 0.00, then the unit is moving.



I hope you are getting what I want to say.

good idea. but i dont want my trigger to consider a teleporting unit as a moving unit. i wonder how should i deal with teleporting units...any suggestions?
 
There isn't really an "easy" way to do that. :( The best you can do is probably use the method that cedi uses. He checks to see if the distance compared to their previous x/y is decently large. Chances are, that it was from teleporting. There are always the chances of someone teleporting right next to themselves but those are a bit less than likely. =)
 
Level 9
Joined
Oct 11, 2009
Messages
477
Or every 0.02 seconds, check a unit that its current order is move, patrol or attack-ground VIA a Unit Group. This will execute the action you want towards the specified unit.
 
Status
Not open for further replies.
Top