If you want to allow users to take a quiz more than once in your Storyline project, enable the Retry Quiz button on the result slide for the quiz. This'll give your users an unlimited number of attempts to take the quiz. But what if you want to limit the number attempts? You can do that, too, by using a variable to track the number of attempts. Here’s one way you can accomplish this:
- First, enable the Retry Quiz button on the result slide. Click here to learn how.
- Then add a number variable to your course to track the number of attempts, and set the initial value to zero (0). For the sake of this tutorial, we'll refer to this variable as the Attempts variable.
- On the result slide, add a trigger to the Retry Quiz button that adds a value of 1 to the Attempts variable when a user clicks it, and move the trigger up so it's the first trigger listed for the Retry Quiz button. To learn how to add and manage triggers, click here.
- Now, add a slide trigger to the result slide that'll change the state of the Retry Quiz button to Disabled when the timeline starts if the Attempts variable is equal to the maximum number of retries that you want to allow. If you need help understanding how to add conditions to a trigger, see this tutorial.
That’s it! If you want to make the Disabled state of the Retry Quiz button more descriptive or noticeable, you can edit the state to change the color of the button or even change the text to “No more attempts” or something similar. To learn more about editing states, review this tutorial.