Forum Discussion
DanGlass-1b3fc1
5 years agoCommunity Member
Game Style Health Indicator
Hey team,
I'm trying to figure out the best way to code/trigger the logic of a game style health indicator.
Let's say there are 5 questions throughout the module.
If you get Q1 wrong then the ...
MariaCS
5 years agoStaff
Hi, Dan.
That is a very cool idea!
My suggestion would be to use states for your health indicator. You can have six states, each with one less green bar than the previous one.
On your Slide Master, create a number variable (let's call it wrong) with a numeric value starting at 1. You can then add triggers that match the state to the number of the variable:
Once you create your questions on your Slide view, add a trigger to the Incorrect layer that adds 1 to the variable wrong.
Every time the user gets a question wrong, the health indicator's state will change to reflect that.
I am attaching my sample .story file used.
Let me know if you have questions!