Add more explicit control around save/load. This still seems to only work sporadically though.

This commit is contained in:
Anna Rose Wiggins 2019-12-11 15:27:50 -05:00
parent 06879ee1ad
commit 77f3d49ba9
5 changed files with 28 additions and 4 deletions

15
savegame.lua Normal file
View file

@ -0,0 +1,15 @@
-- functions to save and restore cartdata
function init_savegame()
cartdata"annabunches_a_pleasant_stroll_e25d3e5c"
end
function load_game()
player_x = dget(0)
player_y = dget(1)
end
function save_game()
dset(0, player_x)
dset(1, player_y)
end