View Single Post
Old 04-12-2009, 04:27 PM  
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Some clarification:
rects and regions are different, how different? Very different.
Rect: A group of 4 values describing minx,maxx,miny and maxy.
Region: A set of points that can fire enter/leave events.

When you register a rect region event, it actually creates a region, add the points in the rect to the region and registers the event for the region.

Even more is that region events fire when the unit's collision circle enters the region. But IsUnitInRectBJ (or whatever that function is called) checks whether the unit's origin (the center of the collision circle) is in the rect.

Don't worry, this is solvable. Just need a way to check if a unit's colllision is in range of a point (and we got IsUnitInRangeOfXY) then use some equations, I think I'll post a function soon.


Edit: IsUnitAtRect
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote