why not introduce api to allow lua scripts to handle their own saving and loading?
have like and onSave and onLoad function
onsave would submit to the engine a list of attributes to store in the savefile, engine also stores the particulars of which lua that submitted the attributes
then on game load, engine starts the script again and passes all the stored attributes to onload so that the script can resume where it was so rudely interrupted by the player
BBS issues with saving and loading
-
- Posts: 1343
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
Re: BBS issues with saving and loading
Not sure I've understood but Lua stuff saves it's own data already, and there's interfaces for trigger a load/save, which calls down into Lua so it can save already.
So, Lua already saves and loads stuff.
So, Lua already saves and loads stuff.