Re: Saving
Posted: Tue Nov 09, 2010 4:44 pm
Heh, yeah. Luckily not everyone gives up that easily.
Yeah, you're right. It would probably best be something like:Jasoco wrote:By the way, don't put the save call in Update. Put it in KeyPress. Else it will be calling the save function every frame. That's what KeyPress is for.
Code: Select all
love.keypressed(key)
if key == 's' and (love.keyboard.isDown 'lctrl' or love.keyboard.isDown 'rctrl') then
-- save code here
end
end
Code: Select all
function love.quit()
--Before quitting, save the new information to the savefile.
end