So I know "config.history.controls = false;" disables the back/forward buttons (and vice versa), but it seems that if I run that code while the story is running, I can't turn them on in the midst of playing. I wanted to make it possible for people to replay the game with back/forward enabled after completing it once, but it seems that the Twine session has to be reset for that code to turn those buttons back on, thus really no way to toggle it in a single session. Any way around this?
Comments
That said, working around that, or doing something similar, isn't impossible, however, I'm a bit confused. How are players supposed to replay the game within the same session? To properly replay the game should require a restart anyway—unless you're manually sanitizing the variable store or have been very careful with it from the beginning.
Are you perhaps talking about enabling the history controls at the end, thus letting the player navigate backwards within the current playthrough/session? Or are you talking about enabling the history controls at the end for the next playthrough/session? Something else? I ask because, again, replay within the same playthrough/session doesn't make a whole lot of sense to me.
Is it possible to programatically save the game in the final passage and then test if that save exists during the startup after a restart?
Yes. Although that's probably a bit complicated for this situation. It also doesn't address isaiaheverin's apparent desire to replay within the same session.
The easiest thing to do would be to do something like the following: (in Twee notation) That said, and again, this doesn't address the elephant in the room (i.e. replay within the same session).
I should probably <<remember>> that every time I can't figure out how to do something, it turns out the functionality I wanted was already there. :P
Random follow-up question, but is there any way of making an array or list of variables? Don't recall reading about it, though I may well have. I know some macros use their own arrays internally, just don't remember seeing how to create one myself. Looks like I can just do it in a Javascript tag and use this functionality to read from it?
Haha, well that's simple. Thanks.