How to stop reseting scene when jumping back to a previous scene


#1

Hello!
I am creating a project where I have built several scenes, with each scene containing a question. Upon answering the question a “next” button is shown allowing user to go to the next scene. A “previous” button is also shown on the nest scene in case user wants to go back to see how they may answered the previous question.

The issue I am running into is that on hitting “Previous”, the scene that is shown again has reverted back to the starting state, asking the question again - rather than showing the user what they have already answered. Attached is the Hype doc illustrating what I am trying to explain here.

My question is, how can the user to hit the “previous” button (on scene 2) and see what they have already answered, and not be shown the question again?
Thanks!!
TestSceneLoad.hype.zip (29.3 KB)


#2

A few ways to do this:

  1. You could store your answers as Localstorage, and then lookup those answers on each scene load. Here’s a walkthrough by @MarkHunte:
    Getting and Setting localStorage ( Simple Score example )
  2. If you were using just timelines (this might be simpler), you could use this option:
    Resume a scene from its last played time
    This each answer could either be at 1 second, 2 second, or 3 seconds, and you would just take the user back to that moment when returning to the scene.
  3. (Oh and one more, courtesy of @jonathan) You could have your input form within a Persistent symbol, which would ensure that its filled-in value (and the animation you show for correct answers) would maintain its state across scenes. Some clever hiding + showing off the scene area would work for when you don’t want it in view.

#3

Converting to persistent symbol works perfectly and is exactly what I needed here. Thank you!!!