HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Enum units in circle

07-13-2008, 07:33 AM#1
darkwulfv
A simple request: The code to enumerate all the units in a circle. Since my math teachings are still behind (I can still hardly project points), I have no idea how this should be done. If it were to be made into a function (which would very nice), the arguments should be group, center, radius, and filter.

If this has already been made (I'm sure it has somewhere), simply linking to it works just fine. Thanks in advance.
07-13-2008, 07:39 AM#2
Rising_Dusk
Collapse JASS:
call GroupEnumUnitsInRange(MyGroup, X, Y, Radius, BoolExpr)
It's even built into WC3 for you.
07-13-2008, 07:48 AM#3
darkwulfv
*facepalm*

I forgot that works in circles, not squares. Thanks =.= (See what trying to code at 3:45am does?)
07-13-2008, 08:24 AM#4
grim001
Thread of the week.