Pick each unit in [unit group] (Zombies) and do action:
Issue order to picked unit: Attack to point: position of unit: closest unit to picked unit in Unit group (Humans)
So every 1 second, each zombie will attack-move targeting the position of the closest unit that is not a zombie. Note that this considers absolute distance, so a unit that is up a ramp or behind a wall will still register as closest even if the essential walk distance doesn't make it necessarily so.
Hey guys,
I need help for a Trigger im running out of mind.
My wish is that every singel unit attacks the closest unit to itself, i finished this problem once 2017 but lost the mapfile.
im not an english man so this is why my english isnt the best :D
if you dont understand my problem please take a look at the arcade map Zombie Arena i want to have a trigger like the zombies chase the nearest unit.
hope i can get some help
and thanks for it .
Event:
Every 1 second
Action:
Pick each unit in [unit group] (Zombies) and do action:
Issue order to picked unit: Attack to point: position of unit: closest unit to picked unit in Unit group (Humans)
So every 1 second, each zombie will attack-move targeting the position of the closest unit that is not a zombie. Note that this considers absolute distance, so a unit that is up a ramp or behind a wall will still register as closest even if the essential walk distance doesn't make it necessarily so.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
In reply to Bilxor:
Oh Thanks a lot!
I dont know how i could miss the Unit Group Pick Action ...
You saved my day. ;)