(note the red is the player, and the yellow are the walls)
You guys might remember me from last year, I got a little better, and I am starting smaller so hopefully this one will work.
Thanks in advance.
Code: Select all
local tileToRight = map[player.x+1] and map[player.x+1][player.y]
Code: Select all
function checkTile(x, y)
return map[x][y]
end
Code: Select all
checkTile(x-1, y) --Left
checkTile(x+1, y) --Right
checkTile(x, y-1) --Up
checkTile(x, y+1) --Down
Code: Select all
if tonumber(checkTile(map_x+1, bity)) == "1" then
love.event.push("q")
end
Code: Select all
function checkTile(x, y)
if map[x] and map[x][y] then
return map[x][y]
else
return "cheater!"
end
end
Code: Select all
if tonumber(checkTile(map_x+1, bity)) == "1" then
love.event.push("q")
end
Code: Select all
if checkTile(map_x+1, bity) == 1 then
love.event.push("q")
end
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest