I thought so. But then you don't need to calculate it, since min and max are always 999999.00, (min + max) / 2 is always 0, so result is always (0, 0) coordinates.
Sorry for the long response.
Anyway, as far as i can see unless your map is bigger than 999999.00 x 999999.00, camera will always pan to exact same spot, center of the map, or i am missing something.
But if it works for you, then i guess all is fine. :)
I don't think that you can use only min and max, since square that these units create is irregular. You should probably use mean of all 4 x and y coordinates.
Ingame we can use Shift + RightClick to set predetermined actions for unit (represented as little flags).
Is there a way to set these actions in WE, at least for movement?
I am just looking for easy way to take unit off its path, and back on.
Edit, Solved:
Orders can not be queued with triggers.
I will go through triggers tomorow, in the meantime take a look at this: http://www.thehelper.net/threads/triggers-memory-leaks-and-custom-scripts.20711/
and this (it is not perfect):
http://manithu.ma.funpic.de/leak_indicator.php
Well i am not sure how did the maker of Wintermaul did it, but here is a thought:
Maybe after, e.g., teal starts building tower you could make 2 invisible dummy units, at start and at the end of teals region, and order one of them to move to other and check distance between them, and if it is...
Maybe you could check if path is blocked and display message.
Use:
Unit - Order Unit to Attack-Move To (Center of (Playable map area))
but i am not sure how would you make them to stop attacking after the path is cleared.