Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to disable autosave (make refresh = restart)?

Hello,
I'm using Twine 2, Sugarcube 2.
When I publish the file and upload it to my site, the refresh button (or closing and reopening the link, for that matter), doesn't restart the game. So I assume some kind of autosave setting is enabled in my Twine game. How do I turn it off?

Comments

  • Unless you enabled the autosave yourself, it's not enabled.

    Refresh not losing the current playthrough state has nothing to do with saves, automatic or otherwise, and there's no way to turn it off. It's an engine feature. Losing your place from an accidental refresh would be silly, so SugarCube keeps track of your current play session.

    If by "closing and reopening the link", you mean closing the tab/window and reopening it, then that should work. SugarCube's tracking of the current play session is based on the browser tab/window session, you close the tab/window and the session is lost. What, exactly, are you doing?

    Beyond that, the Restart menu item in the UI bar does what it says on the tin. Have you removed the UI bar? If so, the effect of the menu item can be easily replicated.
  • You're right, it does restart if you close and open the tab/window. My mistake.

    I did remove the UI bar. How can I replicate that item without the UI bar?

    Thanks a bunch for the prompt responses, by the way. I really appreciate it.
  • In general, I would suggest calling the UI.restart() method, which prompts the player if they wish to restart. For example:
    <<link "Restart">><<script>>UI.restart();<</script>><</link>>
    


    If you have need to do so without player input, then there is the Engine.restart() method, which does not prompt the player. For example:
    <<script>>Engine.restart();<</script>>
    
Sign In or Register to comment.