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
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