Adding up points over a project using variables

Dec 08, 2014

Alright, now this might seem like a basic thing but I've searched and searched for a complete answer on how to use number variables properly and I can't find one for Storyline 2. There are lots of examples that still apply from Storyline 1 but my main question is how does one add up points from variables over a project so that a specific ending is achieved, I have one variable assigned ("choice") and I change the value of "choice" for each answer or selection and the variable works for each individual slide but I haven't found a solution for adding the variables together from each slide for a total. Does this make sense? I don't have any formal training with the product and I'm mostly self-taught in all of these parts but if there is something that's really easy that I'm missing I would like to know.

6 Replies
Samantha Nelson

Linda, I've actually been using that article for this project and it's what taught me how to assign variables, but it only gives an example for one slide and adding the points for that specific slide, my project utilises several slides and this article doesn't help with adding up a number consistently over many slides, unless I'm missing something in there.

Michael Hinze

The variable functionality has not changed in Storyline 2, so any Storyline 1 tutorials you found still apply. See attached a quick example that adds a choice score on each slide to a total when the Next button is clicked. There are lots of variations on that theme, but the basic principles apply: a.) add a trigger to a choice, e.g. a radio button that sets a choice variable to a certain value, b) add this choice variable to another variable,e g. total and c) t the beginning of each slide's timeline reset the choice variable to 0.

Samantha Nelson

Thank you so much for this example, but (and I'm sorry if this is dense-sounding) does principle "c" mean that each slide will be set to 0 so the overall score of the quiz is set to 0 for each new slide? For example, you have three slides and two questions with different values, the user chooses the 10 point answer for slide one and then goes on to slide two and chooses a 5 point answer, after slide two would the unseen total remain at 15 or would it be only 5 because that's what they chose for slide two? I was hoping to use the former because the quiz I'm making is point-based so that it gives different answers at the end depending on the user's choices. I'll play around with this example but if I could get that clarified that would be wonderful, and I'm sorry if you've already stated it and I just didn't understand, finals are coming up for me and I'm a bit frazzled!

Michael Hinze

From your original post, it sounded like you only cared about the final score, that's why I suggested re-using (aka resetting its value at the beginning of each side) the same choice variable for each of the questions.

See attached a slightly altered version that notonly calculates an overall score but also keeps track of the individual score for each question.

Samantha Nelson

Ahh yes sorry about that, I haven't found a graceful way to word what I'm confused about in regards to this so I'm sure my question was horribly opaque, but thank you for the second example, I am concerned about the end-product but not just slide-by-slide, I want the addition of the variables over the entire project to determine an outcome. which is exactly what this second example is  (thank you again! This has been a huge help!)

This discussion is closed. You can start a new discussion or contact Articulate Support.