HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Question about rectangles and GroupEnum...

01-26-2009, 06:11 PM#1
Na_Dann_Ma_GoGo
Hi there,

first of all I would like to know, how I can group units from a certain rectangle. The Rect function wouldn't work because it fails at creating rectangles that have a certain angle, at least I think so.

Second thing is, I've read somewhere that there are better ways to group units apart from GroupEnum... functions by blizzard?
01-26-2009, 06:46 PM#2
Anitarf
Quote:
Originally Posted by Na_Dann_Ma_GoGO
first of all I would like to know, how I can group units from a certain rectangle. The Rect function wouldn't work because it fails at creating rectangles that have a certain angle, at least I think so.
For angled rectangles, you'd need to use either GroupAddUnitsInTriangle or a modified version of Line Segments that ignores units in the closing halfcircles.

Quote:
Second thing is, I've read somewhere that there are better ways to group units apart from GroupEnum... functions by blizzard?
Depends on what you mean by that, but generally no.
01-26-2009, 08:54 PM#3
darkwulfv
Grim001 made a GroupEnumUnitsInQuad function that works really well. Just specify the 4 corners of the rectangle and wham.
01-27-2009, 02:27 PM#4
Na_Dann_Ma_GoGo
Okay thanks, I'll try grim001s function.