ok, this is how i have it.
i have some temp units allied to a human player and some creep computer units attacking.
This skill will order the allied units to temporarily attack/move to the closest computer units.
Now the catch is the allied units have locust and are constantly being made with a temporary life so during the skill, they will be dying/being created. i would need this to repeat for ~20 seconds and include newly spawned units to also attack/move towards the computer.
my idea was to get2 unit groups, 1 the allied, 1 the near by computers, and loop a check of the first unit for allied to all the others to see which is closest and then order him to move to that one, then on to the next, etc etc. but im not sure if that is effecient or will make it lag to much for those 20 seconds.
i'd perfer jass but if it's a GUI way, i can change it over.
let me know i need to explain anything better.
thanks a bunch!
i have some temp units allied to a human player and some creep computer units attacking.
This skill will order the allied units to temporarily attack/move to the closest computer units.
Now the catch is the allied units have locust and are constantly being made with a temporary life so during the skill, they will be dying/being created. i would need this to repeat for ~20 seconds and include newly spawned units to also attack/move towards the computer.
my idea was to get2 unit groups, 1 the allied, 1 the near by computers, and loop a check of the first unit for allied to all the others to see which is closest and then order him to move to that one, then on to the next, etc etc. but im not sure if that is effecient or will make it lag to much for those 20 seconds.
i'd perfer jass but if it's a GUI way, i can change it over.
let me know i need to explain anything better.
thanks a bunch!