Getting tile data
Example script
tiles = GetTiles()
-- if tile fg is equal to 2 (Dirt) then it will print the position of that tile
for _, tile in pairs(tiles) do
if tile.fg == 2 then
log(("Found Dirt at %d, %d"):format(tile.pos.x, tile.pos.y))
end
endLast updated