I made my main.lua file like this
function NoLove()
--love.load= nil
love.draw = nil
love.joystickpressed = nil
love.joystickreleased = nil
love.keypressed = nil
love.keyreleased = nil
--love.load = nil
love.mousepressed = nil
love.mousereleased = nil
love.update = nil
end
state = {}
function loadState(name)
state = {}
NoLove()
require(name)
load()
end
function load()
end
--Loading another main
function love.load()
loadState("states/zero/main")
end
and I made another two main.lua files (A and B) as game states. The A lua is where the game begins. The second lua has a button where it points to A lua. WHen I run it. It seems like the reset button go back to B states again meaning it never resets and the output is the same.
Failing to Restart A Game
Who is online
Users browsing this forum: Ahrefs [Bot] and 10 guests