Howdy, Stranger!

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

Quick Question About Undo/Redo Buttons On Sidebar

By default my game comes with a 'back/forward' button on the sidebar. I have had a quick look online but I imagine more experienced users can answer my question with precision than Google.

Does pressing "back" reset the game conditions to their state when you last encountered that passage, or is the passage essentially reloaded (and any scripts run again)? For example, if a passage began with:

(set: $gold to $gold + 1)

You found a gold coin!

Could you give yourself infinite gold simply by leaving and re-entering the room with the back button? I'm inclined to remove the feature for my game (I'm also interested in any "save game" type options available, but that's a matter for another topic unless anyone has a quick answer :) )

Many thanks!

Comments

  • edited March 2016
    You need to state which Story Format you are using when you ask a question, as answers can be different for each one.

    Generally when you navigate from one passage to another each of the different Story Format engines will store the current state of variables along with the name of the passage within it's History sub-system. The same passage name may exist multiple times within the History sub-system, each occurrence has it's own copy of the state of the variables at the time it was added to History.

    When you use the back/Undo button the current variable state it returned to what it was before before the relevant passage was shown and the content of that passage is processed/executed again.

    This means that the Reader should not be able to cheat using the back/Undo button, this may not be the case if you implement your own back (Undo, return, previous, etc) links.

    re: save game options
    The answer to this is different for each Story Format.
  • Thanks for the answer - I am using Harlowe but, after too days of messing around, I still haven't managed to even get my first passage the way I wanted it. I will keep your response on file and look forward to being less bad at stuff so I can actually use it :)
Sign In or Register to comment.