love.update()
stage.update()
.... ......
function stage.update()
if love.keyboard.isDown("z")
print("goodbye")
love.event.quit()
end
...
why if i click z key I get the message "goodbye" BUT love not exit the game?
Is something about the right placement for calling an event like quit or what?
thank you
Last edited by drfractal on Mon Jan 27, 2020 12:43 pm, edited 1 time in total.
It will only not quit if you have defined love.quit and it retuns something else than false or nil. In all other cases, it should quit. Not immediately though, it will quit after the next main loop iteration.
There are several other things that can cause this (like calling love.event.poll yourself, or causing a hang before the next frame, or overriding love.run wrongly) but it's very hard to say if you don't show the code.