It looks like you're new here. If you want to get involved, click one of these buttons!
::Start
[[Next]]
::Next
Page 2
::config [script]
config.saves.autoload = true;
config.saves.autosave = true;
config.saves.isAllowed = function () {
return passage() != 'Start';
}
(the .isAllowed part doesn't seem to affect the behavior, but the docs recommended it so I included it for the sake of correctness) twee -t sugarcube test > /var/www/twine/test2.html
Steps to reproduce:
Comments
Restart
menu item reboots the game/story, nothing more or less. Specifically, returning the player to the starting passage is not part of its functionality. That said, the player would normally be returned to the starting passage upon usingRestart
, yes, but that's simply because that's the default action upon startup. If, on the other hand, you configure SugarCube to automatically load an existing autosave upon startup, then that's going to take priority over going to the starting passage.If you don't like that behavior, you have a few options:
1. Configure SugarCube to prompt the player about loading the autosave instead. You can (as of v1.0.8) set the
config.saves.autoload
setting to"prompt"
, which will offer the player a choice about whether to load an existing autosave or not.2. Make deleting an existing autosave part of the
Restart
menu item's behavior by binding an additional handler to it. For example: There are other options, but those two are the easiest.PS: You're not terminating your function expression with a semi-colon, you should be.
In my opinion that delete-on-restart behavior should be the default.