Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.

Add autosave #1196

Open
alexgleason opened this issue May 27, 2018 · 1 comment
Open

Add autosave #1196

alexgleason opened this issue May 27, 2018 · 1 comment

Comments

@alexgleason
Copy link

I'm a novice, so please bear with me if I've gotten anything wrong.

It seems that if I want to automatically save, you need to call game:save() after every event. For example, every item script may need to say game:save() within on_variant_changed so that each time I pick up an item the game saves.

I'm wondering if instead, Solarus can build this trigger into the relevant places and provide a configuration variable like game.set_autosave(boolean) which can be passed in to make the game automatically save any time the save data changes.

@PhoenixII54
Copy link

I don't know if there will be such a variable, but i can give you a useful tip : using the metatable or the multi-event script, you can automate this operation in a one-time process.
If you want help about how to implement, you can open a thread on the Solarus Forums

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants