Simple addition wrong answer after first attempt

Jul 12, 2021

I'd like to keep a running total of numbers without having to click any buttons in Storyline. Everything works fine the first time, but if I change a number the new number is adding to the existing total rather than recalculating. Not sure what I'm doing incorrectly. The same set of instructions work perfectly in a Captivate slide but not Storyline.

1 Reply
Walt Hamilton

The problem is that every time you change a variable, you add it to the old value of AddNums.  In the attached sample, I changed the triggers to add Num1 and Num2 together every time there is a change.

I also found some sort of a problem with your project. This trigger was showing as a duplicate in the variable list, so when I made these changes to your triggers, I got a NaN error. I had to recreate the project from scratch to eliminate that error.