So here's the situation.
I have a human p1 controlling a single zergling. Players 4, 5, and 6 also have a single zergling each. I would like to track which player (4, 5, or 6) is closest in proximity to the p1's zergling.
The way I've thought of to do this is to stack multiple locations on top of p1's zergling, each being normal grid square than the last. For example, Location 1 would be the size of the zergling, location 2 would be 1 normal grid square bigger than location 1 on all sides, location 3 would be 1 normal gride square bigger than location 2 on all sides, and so on and so on. If X = zergling the visual would be this: X,location 1, location 2, location 3, location 4.
The triggers would be something like this:
Trigger
Players
Conditions
Actions
Then repeat this for each location and each player.
If two players are the same distance, as in p5, and p6 are both in location 3, then I'd just say that p5 is the closest. Tie just goes to one of the players.
That's my idea, I was wondering if there's a better or more accurate way to do this? Or would this work just fine?
Thanks for your help guys
None.