• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Possible to create circular regions?

Status
Not open for further replies.
Level 11
Joined
Apr 28, 2008
Messages
696
Hi @ all,

is there a way to create circular region in wc3? I need this to get units that stand in front of a hero in a variable field of view:



The above picture shall explain what I need. H stands for hero. The hero is looking along the arrow with a "field of view" of 180° and has the "range of attack" r. The red area is behind the hero and the green in front of him. I allready wrote a trigger that uses sinusfunction in a loop to create an integral out of squareregions that cover the green area.
My problem now is, that all regions created in wc3 are allways aligned to the x/y axis of the world, that means you can't create a diagonal region(if I know how to do that, I won't posting here^^).

Even the solution to add all units in range of hero to a group won't help. You can add the units in range to a group, but that will also add the units standing behind the hero, so that units have to be removed. And that won't work without diagonal regions.

So my question is now, is there a way to get the units and only the unity in the green area? I'm not really fit with JASS, so if there is a way using GUI I will prefer that one.

Greetings Thy
 
Level 11
Joined
Apr 28, 2008
Messages
696
It's ok, when the region ist rectangular, but is there a way to rotate? Cause than my ffunction using integral will work. For now it only works when theo faces 0, 90, 180 or 270°, cause the alignemt of the regions to the x/y axis.
 
Level 11
Joined
Apr 28, 2008
Messages
696
I found a workaround, to simulate a region with the shape of a half circle. I simple use 3 times "add unit in range of point"-actions and create 3 small circles that almost cover the needed area. Not such elegant, but works as well.

Thanks for help^^
 
Status
Not open for further replies.
Top