Forum Discussion
Adding Up Slider Values for Self-Assessment
- 3 months ago
You don't need any triggers to set the value of a slider to the value of whatever number the user selects.
- When you insert a slider, Storyline automatically creates a numeric variable for the slider's value. (It was a good idea to rename your variables to something more meaningful than "Slider[#].")
- The variable automatically resets when the slider is moved to another position.
- BTW, you can also move the slider with a trigger that adjusts that variable.
As for the layers not showing, that's probably because you have the show-layer triggers set to run when the timeline starts for an object called Results Slide 1.
I don't even see that object on the slide, and I can't explain why it's showing up in the Trigger Wizard.
In any case, the show-layer triggers should be set to run when the timeline starts on the Results slide. That would show up as "this slide" in the trigger, just like it does for the calculation triggers.
One problem: you have multiple variables for the running total:
There should only be one variable for the total.
The other issue is a common one with number variables: when to perform the calculations. If you add a slider variable to the total when the user clicks Submit, it will do that every time. So if user submits an answer and moves to the next slide, but then returns to the slide to change their answer, the trigger will add the new number to the total--without subtracting what was previously added. Which means they could potentially end up with a number higher than the actual total.
Bottom line: since the user won't see a running total, it's better to wait until the Results to add up the slider values.
- Start with a trigger that sets the value of the total variable to 0 when the Results timeline starts. (This ensures it will be reset if the user is allowed to retake the survey. Alternately, you could have the first trigger set the total to the value of the first slider's variable.)
- Insert triggers that add the value of each slider variable to the total variable.
- Then use your triggers to show the appropriate layer based on the total value.
This post has a demo that might be helpful. It uses buttons instead of sliders, but the goal is the same: offer custom feedback to survey questions: TIP: Track Responses to Custom Questions or Surveys | Articulate - Community
Thank you so much for your response!
At the risk of pushing my luck, I still need help lol
Here's what I did:
- Following your guidance and the demo you shared, I set a trigger on each slide that sets the value of the slider to the value of whatever number the user selects (e.g. slider set to value "1" if the user moves the slider to "1", etc.)
- I then created a trigger on the Results slide to se the "total" to value 0 when the timeline starts on the slide (to avoid the problem of mis-calculation you described in your response).
- Then I added triggers to add each slider (now converted to a number value, or so I thought) to the "total" when the timeline starts on the slide.
- I created triggers to reveal the custom feedback layers depending on the user's "total" points.
Unfortunately, I tested this "fix" and the neither of the feedback layers were revealed to me. I definitely did something wrong- just can't figure out what. Attached is where I'm at now.
Thank you again for your help!
Amanda