Hi, I'm working on a combat system which requires me to be be to find all units within a certain range of Hero and within between +10 to -110 of his facing angle.
At the moment I'm having issues because apparently circles are not made in 360 degrees, they are made in 180 and negative 180 degrees.
My combat system works fine as long as unit is facing a positive direction, but the trigger won't function if he maintains a negative disposition.
Can someone help me lift up this dude's energy? I don't know what to do, it's like a crisis.
Here's the little picker I use.
It's hooked into a pick every unit on playable map, but it just has the aforementioned problem.
Could somebody please help me with this?
Cheers.
At the moment I'm having issues because apparently circles are not made in 360 degrees, they are made in 180 and negative 180 degrees.
My combat system works fine as long as unit is facing a positive direction, but the trigger won't function if he maintains a negative disposition.
Can someone help me lift up this dude's energy? I don't know what to do, it's like a crisis.
Here's the little picker I use.
JASS:
function Trig_Combat_System_Jass_Func002001003001001 takes nothing returns boolean
if( AngleBetweenPoints(GetUnitLoc(GetAttacker()), GetUnitLoc(GetFilterUnit())) <= GetUnitFacing(GetAttacker()) + 10.00 ) and ( AngleBetweenPoints(GetUnitLoc(GetAttacker()), GetUnitLoc(GetFilterUnit())) >= GetUnitFacing(GetAttacker()) - 110.00) then
return true
else
return false
endif
endfunction
It's hooked into a pick every unit on playable map, but it just has the aforementioned problem.
Could somebody please help me with this?
Cheers.