Forum Discussion
Displaying Progress Icons
Hello community,
I'm building a safety hazard activity that has 10 safety violations. I would like a badge to appear at the bottom of the slide when the user finds each hazard. I have the badges placed as placeholders for visuals, but the actual badge is set to hidden. I can get the first 2 badges to appear, but after that is where the problem starts. There is no particular order once the user selects a hazard. I'm lost. I'm sure it needs some sort of variable, but all the combinations I've tried have not worked. Any suggestions would be appreciated. Thanks. I am uploading my source file.
See the attached .story file. I believe this is exactly what you’re looking for. All badges now appear one by one from left to right, not randomly.
I created a variable called "answeredCount" along with badge variables for badges 1 through 10. On the dashboard slide, badge states are set dynamically based on the value of "answeredCount".On each question slide, when the user clicks the Submit button, two triggers run:
one sets the corresponding badge variable to 1, and the other increments the "answeredCount" variable by 1. This logic is repeated for each subsequent question, updating badge variables 2, 3, 4, 5, and so on.
Once "answeredCount" reaches 10, the logic stops. So if the learner revisits any question, nothing changes and the badge states are retained. Also, repeating any question before earning all badges will not interrupt the process or cause issues. At the bottom of the dashboard, there is a text box displaying all the variables, so you can easily see which questions have already been answered.
4 Replies
- NedimCommunity Member
It's easy to make all the badges appear, but you want them to appear in a specific left-to-right order (with no skipping), regardless of which hazard the user selects. Is that correct?
- FredHarrisJrCommunity Member
Hi Nedim, that is correct. I would like them to appear one by one from left to right, not randomly - which would be easy.
- NedimCommunity Member
See the attached .story file. I believe this is exactly what you’re looking for. All badges now appear one by one from left to right, not randomly.
I created a variable called "answeredCount" along with badge variables for badges 1 through 10. On the dashboard slide, badge states are set dynamically based on the value of "answeredCount".On each question slide, when the user clicks the Submit button, two triggers run:
one sets the corresponding badge variable to 1, and the other increments the "answeredCount" variable by 1. This logic is repeated for each subsequent question, updating badge variables 2, 3, 4, 5, and so on.
Once "answeredCount" reaches 10, the logic stops. So if the learner revisits any question, nothing changes and the badge states are retained. Also, repeating any question before earning all badges will not interrupt the process or cause issues. At the bottom of the dashboard, there is a text box displaying all the variables, so you can easily see which questions have already been answered.
Related Content
- 9 months ago