# Quiz e progress bar

Jul 03, 2021

Hello guys, I want to make a quiz with three questions and a bar that only increases in size when the answer is correct. I thought about using the states of an object, but I don't know how to check what the current state of the object is. Does anyone have an example of this?

###### 3 Replies

There are a lot of ways to go about this. A lot of the choices will depend on the specific options you need for your quiz.

I attached a basic example to help you get started. If you have a design comp or an existing slide in mind, you can post it here in the forums so we can take a look at it.

This post was removed by the author

Hi David, thank you so much for following up on my question. The example you sent works, but I want is to check the position of the bar in percentage. Let's say 3 questions. The bar increases 33% for each hit. If wrong does not increase. If you get 2 questions right, the bar will increase by 33% on the first correct answer and then hit one more, check the position of the bar and it increases from 33% to 66%. The problem is how to check if the bar is at 0%, 33% or 66% to increase another 33%.

Hi Dimitrios - I created three custom states to divide the bar into thirds. There isn't a dynamic way to change the bar into percentages, so you'll need to create the actual states for each percentage you wish to show.

Maybe I'm not sure what you mean by "check the position of the bar in percentage." Can you say a little more?

I set this up using a basic approach:

• A single number variable
• Each time the learner gets a question correct, they go to the Correct slide layer.
• On the slide layer, we adjust the number variable by adding +1 to the value.
• Then we evaluate the total for the variable: If variable = 1, change state to Correct-1. If variable = 2, change to state Correct-2