- Joined
- Nov 30, 2007
- Messages
- 1,202
I need to check if a building is created inside any of say 100 regions
Do I do it like this? or is there a way to combine these regions to one?
Do I do it like this? or is there a way to combine these regions to one?
JASS:
function CheckForTownRect takes real x, real y returns boolean
local integer i = 0
loop
if IsLocationInRegion(townArea[i], Location(x, y) then
return TRUE
endif
set i = i + 1
exitwhen i > MAX_TOWN_COUNT
endloop
return FALSE
endfunction