to try define especifically the 1st position of the row table inside the level table but what i'm getting is all the row elements becoming = 3.
This is for procedural level assembly on my dungeon game. i will post the code is someone could help i appreciate.
function love.update(dt)
level[1][row[1]] = 3
end
function love.draw()
--love.graphics.draw(Tileset, tile[1], 100, 100)
createlevel()
end
function love.keyreleased(key)
if key == "escape" then
love.event.push("q") -- actually causes the app to quit
end
if (key == "right") or (key == "left") then
p:stop()
end
end
function createlevel()
for y = 1, #level do
for x = 1, #level[y] do
t = level[y][row[x]]
love.graphics.draw(Tileset, tile[t], x*32, y*32)
end
end
end
Ty Micha, i realised that, but before i was using a row table inside of level table, after some google research i realised i should make the level[x] a table it self.
Now my problem is another like overllaping rooms for my dungeon, but this will be another topic.