Forum Discussion
Adjust variable according to slide number
Hi!
I'm building a very long quiz in Storyline and I would like to display the question number on top of each page (ex.: 1/50, 2/50, 3/50, etc.) I've created a number variable, with the default value of 1. This works fine for the first question but I'm wondering how to set a trigger to change my variable automatically, according to the slide number. Is this something possible?
- WaltHamiltonSuper Hero
When you say slide number, it sounds to me like you mean which question is this. If you want to depend on the number the system uses for the slide (1.2, 1.15) that will be an entirely different matter, which Judy answers below.
You might put both the reference and the trigger on the master you use for each question where you want the number.
Start the variable at 0, and write a trigger to adjust the variable (add 1) when the timeline begins on the slide.
If there is some manner in which the learner can return a second time to the same slide, you have to take steps to keep the count accurate.
- JudyNolletSuper Hero
Walt answered while I was preparing the attached demo. It uses the Project.SlideNumber and Project.TotalSlides variables on the Master Layout for Question slides.
The Intro slide and the Results slide were excluded from the slide count.
This means the variables will numbers only the question slides.
Here's more info about adding Slide Numbers: Slide Numbers in Storyline 360 - E-Learning Heroes (articulate.com)
Here's more info about variables: https://community.articulate.com/series/articulate-storyline-360/articles/articulate-storyline-360-user-guide-how-to-work-with-variables