- Joined
- Aug 18, 2009
- Messages
- 4,099
When asked why
Well, now I noticed that it is not such a matter but that the region created is slightly bigger than the original rect. Regions consist of cells of the size 32*32. When you use
-
Events
-
Unit - A unit enters Region <gen>
-
-
Conditions
-
(Region <gen> contains (Triggering unit)) Equal To True
-
-
Actions
Well, now I noticed that it is not such a matter but that the region created is slightly bigger than the original rect. Regions consist of cells of the size 32*32. When you use
RegionAddCell
, the coordinates given are reduced to a multiple of 32 (like pathing cells). So the coordinates are those of the lower left corner. A cell at 0;0 stretches from 0;0 to 32;32. What I have not known until now is that RegionAddRect
, which is used in the GUI event, takes the max coordinates of the rect to form another row of cells. If the rect goes from 0:0 to 128;128, the resulting region will contain 0;0 to 160;160. Sounds most likely like another Blizzard inaccuracy.