just have it under a repeat forever action and a small delay to keep it from going insane. any unit being idle seems like it could cause conflicts with other units in the map.
can't have it repeat forever because then Every unit that is created will then do this. i think he wants only 'select' units to do this not EVERY unit to do this. anyways. if you want these 'few' or 'select' units to do this, you can use 'unit group' to select them after they have been created.
Events
Unit - Any Unit Enters (Entire map)
Local Variables
Conditions
Actions
Unit - Order (Triggering unit) to ( Move targeting (Random point in (Entire map))) (Replace Existing Orders)
Unit Group - Add (Triggering unit) to Unit Group
Next trigger.
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit - Order all units in Unit Group to ( Move targeting (Random point in (Entire map))) (Replace Existing Orders)
you are assuming that he is using any unit enters map, i was assuming he was using triggers to create unit
event: create zergling at point a
action:
order last created unit to move targeting random point.
repeat forever: wait 5 seconds, order last created unit to move targeting random point.
no, the order would be in the same trigger that creates the unit so you would reference the unit with last created unit.
i misstyped, i didnt mean to write event create zergling, i meant for that to be an action previous to the order
but that said, i still dont see how unit becomes idle would be used here unless you are using it in conjunction with a unit group, but if that was the case, you could just do what you did in your above response.
@op
if you will need to reference the moving units later in another trigger via the group then universal's way is probably better, but if not mine is faster and is contained in a single trigger
How do I make it so right after a unit is spawned it moves around randomly in a region?
order last created unit to move to random point of entire map
uses issue order targeting point and then use random point in region: entire map
Sometimes more than one unit spawns, will that work for all units that spawned?
All the units spawn from the same region.
You could also take a look at critters in data if that's the sort of behavior you want.
I see don't see that, I see "ability command".
click on the parenthesis
"Ability Command" is still there after doing the rest.
then you are doing something wrong. make sure it is targeting point
I did and "Ability Command" is still there.
I did it now.
It stopped moving after a short time. I want it to keep moving.
@Bareleon: Go
Unit - Order (Triggering unit) to ( Attack targeting (Random point in (Entire map))) (Replace Existing Orders)
you can change 'entire map' to the region you want the point in. you can also change the "attack" to "move" if you like.
as far as to keep them moving. you need to change the event
Unit - Any Unit Becomes idle
could help for when they simply stand there. then repeat the same action above.
just have it under a repeat forever action and a small delay to keep it from going insane. any unit being idle seems like it could cause conflicts with other units in the map.
can't have it repeat forever because then Every unit that is created will then do this. i think he wants only 'select' units to do this not EVERY unit to do this. anyways. if you want these 'few' or 'select' units to do this, you can use 'unit group' to select them after they have been created.
Events
Unit - Any Unit Enters (Entire map)
Local Variables
Conditions
Actions
Unit - Order (Triggering unit) to ( Move targeting (Random point in (Entire map))) (Replace Existing Orders)
Unit Group - Add (Triggering unit) to Unit Group
Next trigger.
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit - Order all units in Unit Group to ( Move targeting (Random point in (Entire map))) (Replace Existing Orders)
Change to suit your needs.
you are assuming that he is using any unit enters map, i was assuming he was using triggers to create unit
event: create zergling at point a
action:
order last created unit to move targeting random point.
repeat forever: wait 5 seconds, order last created unit to move targeting random point.
its basically the same effect
the only event: that has create unit is
Unit - Any Unit creates a unit with ability Any or behavior No Game Link
the only event way to determine where the unit is,
Unit - Any Unit Enters (Entire map)
@joey101d: Go event: create zergling at point a
no such event. lol.
no, the order would be in the same trigger that creates the unit so you would reference the unit with last created unit.
i misstyped, i didnt mean to write event create zergling, i meant for that to be an action previous to the order
but that said, i still dont see how unit becomes idle would be used here unless you are using it in conjunction with a unit group, but if that was the case, you could just do what you did in your above response.
@op
if you will need to reference the moving units later in another trigger via the group then universal's way is probably better, but if not mine is faster and is contained in a single trigger