# Using Number Variables and States or Layers?

Jan 30, 2023

Hi, I'm developing a customer service scenario where the learner either earns stars or loses stars based on multiple choice answers. I'm having a hard time wrapping my head around how to best do it. I want to make the correct number of stars appear as they go through the course so they have immediate feedback.

So, I was thinking having each star have a filled/empty in States. Meaning, if they have earned 3 stars, 3 stars show the "filled" star state and 2 stars are "empty" (just an outline).  Or, should I do it with layers - so if they have earned 3 stars, the layer with 3 filled in starts shows up as part of the number variable. I've not used number variable before.

It's getting complicated for me since you can lose and gain stars with each question and I want to keep the visual of how many they have earned so far.

Any tips would be greatly appreciated!

Thanks

###### 3 Replies

There could be numerous ways to do this.  One might be like this attached.  Have one "bar" where the stars are, and its state changes based on a Variable count.  +1 for correct, -1 for incorrect.

I have the bar blank as normal state, and then each star gets filled in state by state.

Can get tricky this way if the user kept clicking YES on any give question as the "count" would keep having 1 added to it.

You might want instead to change the counting variable so that it is only adjusted when user clicks submit or next.

E.g.  I have it as "add 1 to StarCount (variable) when user clicks Yes button" & "subtract 1 to StarCount when user clicks NO button".

Better would be to "add 1 to StarCount when user clicks Submit/Next, IF YES Button=Selected"  & "subtract 1 to StarCount when user clicks Submit/Next, IF NO Button=Selected".

If you want the score to show on several different slides, you might want to put the score bar in the Master slide. For slides where you need the score, use the "ScoreBar" Layout in the attached sample. For ones that don't, use "NoScore".

In this sample I change the score by clicking, and like Tracy says, it is susceptible to over- and under-clicking. I would change the score variable by following her last suggestion: "Better would be ..."

Thanks so much!