Probably I'm not supposed to...? But I have. Here's my edited version of love.run() which is calling love.load() near the start?
Code: Select all
function love.run() -- Randomness! if love.math then love.math.setRandomSeed(os.time()) end -- Load things in love.load() -- Big loop for everything while true do resetvariables() music:setLooping(true) music:play() -- Main game loop until a hero dies repeat -- Process events if love.event then love.event.pump() for name, a,b,c,d,e,f in love.event.poll() do if name == "quit" then if not love.quit or not love.quit() then return a end end love.handlers[name](a,b,c,d,e,f) end end -- Update love.update() -- Draw love.graphics.clear(love.graphics.getBackgroundColor()) love.graphics.origin() love.draw() love.graphics.present() -- Do I need this? love.timer.sleep(0.001) -- Call the A.I. if the game is not finishing if TURN == 2 and finishing == 0 then AI() end until finished == true mode = "Title" -- "Title", "Select Hero", "Select Cards", "Overview" mode_old = "Title" -- Switch back with escape twice end end
EDIT: Okay, quite simple in the end then. Just changed love.load() to love.load(arg).
Don't know where arg is defined... but gonna go with what I think works..!
EDIT2: Thanks for the tip Nixola, fairly new to forums so still picking up ettiquete. Would happily delete the below but I think that's not allowed for a normal user.