Game Style Health Indicator

Mar 26, 2021

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 5th object state changes from green to red.

If you get Q2 wrong, depending on how you did with Q1 you might need to change either the 4th or 5th objects state. And so on and so forth.

So I'd be keen to hear your thoughts on this, mainly around how to identify what's the next available green object and then state change it to red. Please see attached visual of the health indicator.

So far I have it set up on Master slides so it's visible throughout the module.

Cheers,

Dan

4 Replies
Maria Costa-Stienstra

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!