Howdy, Stranger!

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

Automatically (loadgame: ) when the player comes back.

edited October 2015 in Help! with 2.0
Hello! I'm new to Twine and this programming stuff.

I'm trying to figure out (savegame: ) in case anyone wants to stop and continue the adventure later. I would like to automatically load the savegame when the player comes back.

So on the first passage I typed in
(if: (savegame:"A") is true)[(loadgame:"A")]

But this makes the passage blank in the Play testing. The text flashes once and disappears again. What am I doing wrong?

Comments

  • If you look at the Harlowe overview you will see that there is another marco named (savedgames:) that you should be using to check to see if a save exists. So you could add something like the following to the first passage of your story:
    note: The following assumes you used (savegame: "A") to save.
    (if: (savedgames:) contains "A")[(loadgame: "A")]
    

    warning: If you do add an automatic reload to your story the Reader will only be able to re-start the story from the start again (on that machine) if they do one of the following:
    a. Rename the story HTML file
    b. Use a different brand of browser
    c. Clear their web-browser's cache
    d. Manually edit their web-browser's cache.

    It may be a better idea to check to see if there a save exists and then ask the Reader if they want to reload or re-start the story. Something like the following:
    (if: (savedgames:) contains "A")[
    You have a previous saved game, would you like to load that game or continue?
    (link: "Load Save")[(loadgame: "A")]
    [[Continue->Story Start]]
    ]
    
  • Thank you very much!
Sign In or Register to comment.