Maintain states with variables (Star Collection)
Feb 26, 2020
By
Sot Iris
Hello!
I have created a "star collection" board for a quiz.
The concept is: 10 questions, yellow star for correct questions, red star for wrong. After each question user must see how many yellow and red stars have been collected.
What I am trying to achieve: If users have a yellow star for Question 1 and then move to Question 2. I want them to be able to see the Q1 yellow star along with the star for Q2 (either yellow or red).
Please see attached. I literally cannot find the answer on this one :/
(check master slide as well..)
Thanks!
4 Replies
Take a look at this project.
It's easier to keep track if you create a variable for each question.
I used a number variable with a default value of -1.
-1: Unanswered
0: Incorrect
1: Correct
When the correct layer comes up there is a trigger to set the question variable to 1.
When the incorrect layer comes up, there is a trigger to set the question variable to 0.
There are also triggers on the Feedback Master to change the state of the stars.
For example Star 1 has the following triggers:
Timeline Start: Change State of Star 1 to correct if q1 = 1
Timeline Start: Change State of Star 1 to incorrect if q1 = 0
When Variable q1 Changes: Change State of Star 1 to correct if q1 = 1
When Variable q1 Changes: Change State of Star 1 to incorrect if q1 = 0
Hi Russell
Thank you very much. It works fine. I literally spent 5 hours today to figure out how to do it and tried pretty much everything. I am surprised that other people have not asked this type of question, as star collections is a good gamification aspect.
However, I still cannot understand how you managed to make it...How does "software" know what is q1, q2 etc?
Thank you very much!
Here's a video that shows you how to setup the first question.
Fantastic! Thank you so much.
This discussion is closed. You can start a new discussion or contact Articulate Support.