- Joined
- Feb 23, 2007
- Messages
- 1,030
Assuming the units Point Value = Collision size, would this be a good check to see if they are within a certain range?
JASS:
function UnitInRange takes real r, unit u, real x, real y returns boolean
local integer p = GetUnitPointValue(u)
local real x2 = GetUnitX(u)
local real y2 = GetUnitY(u)
return SquareRoot((x2-x)*(x2-x)+(y2-y)*(y2-y)) < r+p
endfunction
Last edited: