

i would really appreciate it, if someone could tell me what i do wrong.
Ps: Iam new to love2d, so excuse me if it´s a stupid mistake

Code: Select all
State == "Playing"
Code: Select all
function StateChanger(dt)
if love.keyboard.isDown("1") and State == "Menu" then
State = "Playing"
LOAD_MENU(dt)
end
end
Thank you so much! Works perfect now0x72 wrote:you never load the menu again (only changing state) and you have some initialization (for player) in the LOAD_MENU in case ofso try:Code: Select all
State == "Playing"
good luck with the gameCode: Select all
function StateChanger(dt) if love.keyboard.isDown("1") and State == "Menu" then State = "Playing" LOAD_MENU(dt) end end
just a suggestion, feel free to ignore:
move the string (e.g. "Playing") as an argument of this LOAD_MENU (LOAD_STATE name maybe? and why so uppercase anyway?) and set the state inside it, so you never again set the state but not initialize it.
Users browsing this forum: Ahrefs [Bot] and 8 guests