Forum Discussion
SamuelBarton
2 years agoCommunity Member
Using Variables to add and subtract score count up
Hi Everyone,
I need some advice on a storyline 360 I am creating.
I want it to add up points as it goes depending on the interactions of the user. I have managed to make the project add up the answers by using true/false variables if they are correct, but I want to give the user the option of reviewing the answers before they submit it - and this is where the problem lies!
Currently, I have told it to submit the score to a 'TotalScore' when the user clicks 'next' however, as expected, up on review or just going back to a question, it will add the score again to the Total.
I would like it to do two things:
- Take into consideration the score if someone changes an answer
- Not add points if a question is reviewed or looked at a second time
Any help with this would be gratefully received!
- JudyNolletSuper Hero
Here's what I'd do:
- Instead of a T/F variable, track answers with a number variable, using 0=incorrect and 1=correct. This variable should be properly set whenever the user answers/re-answers a question.
- Use another number variable (e.g., "Total") for the score. Whenever you want to determine the score, start with a trigger that adjusts the score to 0, so the adding starts from there. Then use triggers to add all those other variables to the score.
- Definitely easier to do this just once at the end with a submit button.
- If you want to show a running score, you need to have all the triggers one each graded interaction.