Two buttons don't work!
Posted: Sat Feb 24, 2018 9:12 pm
I am new to coding in Love2d and Lua. I have a start screen where you can "Start" or "More".
Both buttons don't work though. Only the one coded lower... Here is the snippet of code where
the buttons are:
Let me know how I can get both buttons to work if it is possible...
Both buttons don't work though. Only the one coded lower... Here is the snippet of code where
the buttons are:
Code: Select all
function love.mousepressed(x, y, button, isTouch)
if button == 1 and gameState == 1 and y < 510 and y > 419 and x < 320 and x > 99 then
gameState = 2
end
end
function love.mousepressed(x, y, button, isTouch)
if button == 1 and gameState == 1 and y < 510 and y > 419 and x < 740 and x > 559 then
gameState = 3
end
end