Forum Discussion
Counting how many times a number appears and tracking/reporting results
Hi, Lee.
Thank you for reaching out!
While Javascript might be a way to achieve what you're looking for, I wanted to offer you a suggestion using variables in Storyline.
You can have two counters (one for clicks and one for times the random number equals five):
You can set up so the random number changes based on timeline cues (in my attached example, it shows a new number every second, and then the timeline restarts). When the variable changes, you can have a trigger to add the value of one to counter if it equals five. Another trigger will add the value of one to counter_click when the button is clicked.
The results are displayed on the end slide (in my example, the results slide appears either when the user clicks the End button or clicks the main button ten times).
If you need to track and report to an LMS, you can use the method described in this article.