Quantcast
Channel: Twine Forum
Viewing all articles
Browse latest Browse all 3830

Sugarcube 1 if autosave

$
0
0
Is there a way to only trigger code if an autosave is available in sugarcube?

I have a load autosave button on my start screen that I only want to do stuff if the autosave is there, like e.g. stop the start screen music.

I tried just putting this code in the autosave passage but I realised that the autosave would reset any variables to their states at load so that didn't work too well since I couldn't control it with a variable from the start screen.

EDIT: The second thing would be more useful as then I can activate code immediately after any autosave load. Is there a way to have a persistent variable across an autosave trigger?

EDIT: I just read about "if (SaveSystem.autosaveOK()) { /* Code to manipulate the autosave. */ }" though still need to work out how to use this.

Viewing all articles
Browse latest Browse all 3830

Latest Images

Trending Articles



Latest Images