- Joined
- Jul 21, 2008
- Messages
- 1,121
I don't like idea of placing zillion pathing blockers to change terrain pathability of Lordaeron Summer Rock tile, so I made this function (pretty simple one) to run in initialization, but guess what... It doesn't work...
Can someone suggest me either way to fix this function or some other way? Mind that I don't want to use any WE addons or extensions (WEU, JNGP, ...)
Any help is apreciated, thanks in advance!
Can someone suggest me either way to fix this function or some other way? Mind that I don't want to use any WE addons or extensions (WEU, JNGP, ...)
Any help is apreciated, thanks in advance!
JASS:
function TerrainPathability takes nothing returns nothing
local real x = GetRectMinX(GetWorldBounds())
local real y = GetRectMinY(GetWorldBounds())
loop
exitwhen y >= GetRectMaxY(GetWorldBounds())
set x = GetRectMinX(GetWorldBounds())
loop
exitwhen x>=GetRectMaxX(GetWorldBounds())
if GetTerrainType(x, y) == 'Lrok' then
call SetTerrainPathable(x,y,PATHING_TYPE_WALKABILITY, false)
endif
set x = x + 50
endloop
set y = y + 50
endloop
endfunction