How To Display Radio button Totals Without Clicking A Button

Hello,
I'm new to working with variables and I've come a long way in trying to solve this problem.
In the attached Storyline file, I have a series of radio buttons. A learner can select radio buttons for values of 0, 1, or 2 in each of three rows.
Along the right edge, I am displaying the current values of each row, and below them a sum of all three rows.

In theory, the sum value at the lower right can only be a number between 0 and 6. But, if the user clicks any of the radio buttons (for values 1 and 2) more than one time, the total keeps increasing to numbers larger than 6.

How do I alter this SL file so that the value at the lower right ALWAYS reflects the sum of the three values above it, without using a button that triggers a calculation?

5 Replies

You need a trigger that wipes out the current value.

I'd try this:

1. subtract variable score 1 from AddTotal
2. Set score 1 to X

Something like that should work on the click...it essentially subtracts the value of the variable and adds the new value.

Thank you SO much ... this really was a huge step forward in solving this problem - I learned a great deal by viewing your update of the SL file!

I ran in to one issue: If the learner selects a '1' or a '2', and then changes their mind and clicks the '0' button, the 'AddTotal' wouldn't reflect that update.

So - I added a new trigger to the 'zero' radio buttons that goes like this: (Example is for the first row of radio buttons)