# sum of numeric variables and change of state if numeric variables changes

Hello,

After many searchs on the forum about calculating numerical variables, I have not yet managed to make a sum of variables in my study case. So is the situation

I have several drag objects that can end up in the same correct drop zones (a score here). In addition, I created a variable if the drag and drop zone are entered correctly. There is also a variable if the drag is not correctly dropped.
I would have liked a sum of the correct drops and a sum of the incorrect drops.
I just can't manage to do this. EX MDS Drag and drop

Another question: I would like to change states when the sum of different variables has a certain score. But Articulate apparently remembers the intermediate sums and then several states are changed. Can I turn a sum of variables into a kind of absolute number where the state can then change. EX MDS fill in

Thank you for your valuable help!

###### 10 Replies Hi, Caroline,

I took a look at your file (thank you for sharing!), and there are a few things that you might want to check. Some of the triggers you setup as "add 1 to ___", which works. However, I saw a few instances where you did "set to 1", which would then change the calculation back to 1, even if the number was higher (take a look at your 5-10 drop, for example).

In order to calculate the sum, what I would do is, for each of the correct variables, add to "Vsumcorrect" when the variable changes. Here's a screenshot:

If you need additional help, I'd be glad to re-work some of the triggers you have.

Good luck,

Maria Hello Maria.

Thank you. I Had another request for the second story in att. It would be very fine if you can look to this file.

It is about changes states when the sum of variables (final score) is equal to the correct state. I saw that articulate retain sum van intermediate variables and changes then the intermediate scores . Can I pass the final sum to a sort of absolute sum to avoid this problem?

Many thanks

Caroline

Van: E-Learning Heroes
Verzonden: woensdag 13 januari 2021 18:52
Aan: caroline brusselmans
Onderwerp: Reply to sum of numeric variables and change of state if numeric variables changes Hi, Caroline,

There's A LOT that I don't know about Storyline (actually, a lot more of unknown items than known :) ), so maybe someone else has a better idea to achieve what you want. What I would do is not give the user the option to keep adding before you show them the results. You can have one button to calculate, and the one reset button that you already have). Once they input all the text fields, they calculate, get their results, then they reset to start over.

I'll keep looking, though, to see if there's a better solution to what you are trying to do with this one,

Maria