How to Earn Badges by Viewers' Choice w/Variables

Using badges, which is one of the gamification elements, in your videos may increase the encouragement to watch your videos. Imagine that there are three questions in the video. If the audience answers two of these correctly, they will earn the Honesty badge. Let's do it.

1- First of all, you need to have the badges as images in the image library. Add the image of the badge using the Image widget to the timeline that you want to appear in the video. Arrange the time interval. We set it as it appears along the video. Turn off Visible feature from the Properties panel.

2- Now add a Single Select Question to the video. Open the option settings that you will give a badge. Now we will define the variable. If the user selects this option, let's set it to get 1 point. To do this, write “score = 1” in the Set Variable section and save it.

3- Add the second question. Open the option settings that you will give a badge. Now, we will define the variable. If the user selects this option, the score will increase by 1 point. To do so, type “score = $ {score} + 1” into Set Variable and save it.

4- Add the third question. Open the option settings that you will give a badge. Now, we will define the variable. If the user selects this option, the score will increase by 1 point. To do so, type “score = $ {score} + 1” into Set Variable and save it.

5- Add a Conditional widget to the timeline to determine the condition and the action to be taken. Let the condition be the following: If the audience’s total score is 2, give him/her a badge- make visible the badge image.

Click the Add Condition button. We need to check the score value here. Type "score = 2" and save it.

6- Now, you need to position the added Conditional Action widget just after answering the second question.

7- You need to determine which action to take under this condition from Condition Actions in the Conditional Action Properties panel. Select “Set Visible” from the action list. Then, select the badge image’s name from the Target Track list and save it.

8- You should copy this condition at the end of the other questions. Remember that the more time you want to check the score condition, the more conditional action you need to add.