Autosave?

TheHatMan
Is there any way or any code that allows you to autosave in gamebook? It'd be a really cool function, and I'd love to give people the option of doing it since you could easily forget to save.

george
I haven't tried it, but is it possible to use a Request script in gamebooks? With Request you can do a RequestSave and that should work for autosave. See http://docs.textadventures.co.uk/quest/ ... quest.html

jaynabonne
Keep in mind that for the desktop version, "save" invokes the Save As dialog box where you choose the file name. So if you don't mind having it popping up on its own from time to time... :(

george
That's unfortunate. And it doesn't look like there's a way to write to a file on the desktop either?

OurJud
Not autosave as you would like, but how about reminding the player to save, every so often, via the text descriptions?

thelaststarwhale
This was posted forever ago, but I'm going to respond in case people have questions about it.

My game is technically a TA but the player doesn't type in commands. They interact solely with select items in their inventory. Because of this, I wanted to add an autosave feature.

As soon as the game is loaded, they're prompted to save. After that, it will save automatically on a timer.

1. Create timer that will prompt the player on startup. Use this code:
request (RequestSave, "")


2. In the start script, add this code:
EnableTimer (timer1name)
SetTimeout (1) {
DisableTimer (timer1name)
}

If you don't enter it this way, it will keep repeating and they'll never be able to play the game.

Now that the initial save is out of the way, you can enable autosave. This will be a second timer that activates after so many seconds. The way I did it: after their first interaction with my game, it started the autosave timer. This way I know they have that first save out of the way and no errors will be raised. Create your second timer, set the interval for how often you want the game to save, and then enter the same code from the 1st timer.

*I'm sure there are different ways to do it. Maybe better ways. But this is what worked for me on the latest version.

**Not sure you'd be able to autosave in a gamebook. If you were bent on creating a gamebook, you could alter the interface of a TA and use commands to create hyperlinks for your game.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums