HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detect Stationary Units

02-06-2004, 10:13 AM#1
chuayw2000
Is there a way to detect that a unit is not doing anything? Like it is not attacking and just standing there doing nothing. This occurs when you target a unit with mass teleport and after that the unit just stays there doing nothing. Even a trigger which fires when a unit is issued a stop order doesnt work for this. Any help?
02-06-2004, 11:36 AM#2
johnfn
I like a picture at the bottom... hehe...

Alrighty..... This is going to be a really hard answer for a really easy question..... (there has to be an easier way, but thats me, Mr. Do Everything The Hard Way):ggani:

For each integer A from 1 to (units in(Playable Map Area)) do Pick all Units in(Units in(Playable Map Area)) and do Region -- Move Region_unit(a) to (Position of Picked Unit)

Wait 5.00 seconds

Now the only problem is trying to find if there's a unit in each reigon... ill leave that job up to you ;) ,but all you have to do is detect if a unit is in the reigion, then just do whatever you want with that specific unit.
02-06-2004, 01:42 PM#3
Vexorian
Quote:
Originally posted by chuayw2000
Is there a way to detect that a unit is not doing anything? Like it is not attacking and just standing there doing nothing. This occurs when you target a unit with mass teleport and after that the unit just stays there doing nothing. Even a trigger which fires when a unit is issued a stop order doesnt work for this. Any help?


There is no Unit is idle event

But with a periodic event and Pick Every Unit in Playable Map Area you could try to compare a unit's current order, if it is stop or null then the unit is idle
02-06-2004, 03:06 PM#4
Klownkiller
There Is an event that may be useful. I have used it in td's to keep units from getting stuck.

Event Unit - A unit is issued an order with no target

You may want to try this one out. It includes the stop comand since it is an order but has no target. You can then use conditions to determine the area of the map where the units are located.
Hope this helps.