Trying to create a variable to use to change the state of an object....and it's not working!

Aug 25, 2021

I am new to using Storyline so I'm still figuring things out.  I am creating an Escape Room.  I want the status of an object to change to visited but only if they complete the quiz that is associated with the object.  When you click on an object it takes you to a quiz page.   I created a true/false variable for the quiz page so when the user click on the "correct" button the variable changes to "true.  Then I set a trigger on the object to change to visited when clicked but only if the variable is true.  It's not working.  The object changes to visited when clicked even if the user doesn't take the quiz.  I hope this makes sense.  I don't know what I'm dong wrong.  Any help is appreciated. 

1 Reply
Walt Hamilton

The built-in state "Visited" has its own superpowers, and it doesn't like you messing with them. Any object with a Visited state will change to that state, when clicked, so it doesn't appreciate your trigger.

Delete the Visited state, create a different state, like "QuizDone", and use it instead.

However, the way you describe it, the learner has to click once to take the quiz, then again to see the object change its state.

There are a couple of easy ways to fix that:

1. Put the quiz on the same slide (on a layer), then when the learner clicks the "correct" button, it can change the variable and the state.

2. If the quiz is on another slide, you need to set the slide to return to initial state on revisit. Then create a trigger that changes the state to QuizDone when the timeline on the slide starts if the variable = true.

 

There is a sample that uses this principle at this post:
https://community.articulate.com/discussions/articulate-storyline/free-sample-restricted-and-free-random-navigation-using-variables-and-triggers
It has four buttons that take the learner to different slides (where the quiz would be). Then the buttons change state. When they are all visited, a button appears that can have any trigger on it you want. In the restricted navigation, the four buttons appear in order, only after the previous one is visited. In mixed, they can be visited in any order, and in free the exit option can be chosen without having to visit the others.