Forum Discussion
Storyline 360 Unable to Restrict skipping in a quiz
- 22 days ago
MargaretMcCa446: As I understand it, you don't want someone to jump to the next slide via your custom Next button until they have answered the question.
Here are a couple ways to do that
For the trigger on the Next button, add conditions so it will only fire if any of the responses = Selected. In other words, there would be a condition for each response like "if responseA = Selected." The conditions would be connected with "or" so that only 1 condition needs to be met. To avoid confusion, I'd add an Else statement that shows a warning message that tells the user they have to select a response.
or
Set the Initial state of the button to Disabled (or, if you prefer, Hidden). Add triggers that change the button to Normal when the user clicks each response.
A few notes:
In your "correct one" trigger, the conditions are connected with "and." That means that the trigger won't run unless all of the conditions are met.
When you want a trigger to run when any condition is met, use "or" to connect the conditions.
A bigger issue: You're checking for the Visited state. Any object with a Normal state and a Visited state will automatically change to Visited when clicked. And it will remain in the Visited state unless a trigger changes it.
Question-response buttons should have a Normal state and a Selected state.
For multiple-choice questions (that is, only 1 response is correct), all of the response buttons should be in a button set. That will ensure that only 1 button in the set is in the Selected state at a given time. In other words, selecting a button automatically deselects the other buttons in the set.
For multiple-response questions, the buttons should not be in a button set. In that case, each button will automatically toggle between Normal and Selected when the user clicks it.
Here's more info about how to take advantage of built-in states.
In an earlier reply, you included a screenshot of this trigger:
Those conditions should also use Selected (not Visited).
Also, the "when" in that trigger is problematic. What if the user doesn't select an answer before the timeline ends? In that case, the custom Next button would never change to Normal. And if you extend the timeline, a user who answers quickly might be frustrated waiting for the button to change.
Instead, have the Next button change to Normal when the state of at least one of the response buttons = Selected.
Related Content
- 4 months ago
- 5 months ago