HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Retrieving an ability's AoE

02-22-2007, 03:53 PM#1
darkwulfv
Say I have a spell, like blizzard, where it gives a large radius circle to show the AoE of the spell before casting. What is the JASS native(s) that finds the units in the spell's AoE?
02-22-2007, 04:34 PM#2
Captain Griffen
There isn't one.

Additionally, abilities affect any unit whose collision radius intersects the AoE, while JASS takes the centre of the unit.
02-22-2007, 04:44 PM#3
darkwulfv
Damn.

So my best bet would be to use
Collapse JASS:
GetRectFromCircleBJ
and have the radius match the size radius of the spell's intended AoE, and use a targetting spell instead?
(yes I know it's a BJ but it saves 3 lines of code, if not more, depending)
02-22-2007, 04:55 PM#4
blu_da_noob
GetRectFromCircleBJ creates a rect which is the smallest square which could enclose your circle. So unless you want your AoE to be a square...
02-22-2007, 04:57 PM#5
darkwulfv
Grr.

So what native DOES create a circular rect?
What I wanted was to pick # random units from a circular rect and perform an action on them. (Using the pick random unit from group native (yes i know that's not it's name, the name escapes me right now.))
02-22-2007, 05:02 PM#6
CommanderZ
There is something like "Pick every unit in range and do..." in GUI
02-22-2007, 05:05 PM#7
blu_da_noob
There is no such thing as a circular rect. Rects are square. The difference between GroupEnum and the actual skills with collision size in is fairly minor. If you Enum for radius+32 it should be close enough for practical purposes.
02-22-2007, 05:13 PM#8
darkwulfv
Good enough. Thanks blu.

...Coulda sworn I saw a native for a circular rect or something like that.
02-22-2007, 05:29 PM#9
blu_da_noob
Ok, I actually lied there. Rects aren't square, except when they are. Rects are rectangular (as the name might imply). Rects cannot have anything but 4 straight, (opposite) parallel sides. Oh yeah, with corner right angles.
02-22-2007, 05:56 PM#10
Vexorian
YOu can however create a circular REGION. I think peppar made a function that did so, I will raise the bet and say that you can still find this function in wc3jass.com
02-22-2007, 06:06 PM#11
blu_da_noob
He did and you can. Though that is just a large set of small rects. I doubt whether it's really necessary for such an application.
02-22-2007, 06:09 PM#12
Vexorian
Quote:
Though that is just a large set of small rects
Not true