Answer the question
In order to leave comments, you need to log in
Can I cast objects to a two dimensional lua array?
there is an object like
box = {
x = 400,
y = 96,
w = 16,
h = 16,
ySpeed = 0,
yMaxSpeed = 400,
onGround = false,
texture = love.graphics.newImage("box.png")
}
Answer the question
In order to leave comments, you need to log in
the answer was found by scientific poke, if someone needs this code
box = {{x = 400, y = 96, w = 16, h = 16, ySpeed = 0, yMaxSpeed = 400, onGround = false, texture = love.graphics.newImage("box.png")},{x = 400, y = 96, w = 16, h = 16, ySpeed = 0, yMaxSpeed = 400, onGround = false, texture = love.graphics.newImage("box.png")}}
love.graphics.print(box[N].x, 10, 10)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question