zbizu
Legendary OT User
as in title - this function lets you check if tile is walkable (useful when you have to place items randomly in area filled with blocking objects)
this function works as isWalkable, but all you need is position so you don't need "cid" anymore!
Do not post that script on other forums without my permission
0.2/0.3/0.4/1.0:
1.0 metatables:
this function works as isWalkable, but all you need is position so you don't need "cid" anymore!
Do not post that script on other forums without my permission
0.2/0.3/0.4/1.0:
Code:
function isPathable(pos)
pos.stackpos = 0
local tile = getThingfromPos(pos).uid
if tile > 0 then
return not hasProperty(tile, CONST_PROP_BLOCKSOLID)
end
return false
end
1.0 metatables:
Code:
function isPathable(pos)
local tile = Tile(pos)
if tile then
return not tile:hasFlag(TILESTATE_BLOCKSOLID)
end
return false
end
Last edited: