Variables Not Updating Correctly? Or Multiple Layers Not Appearing?

May 18, 2015

I recently created an Are You Smarter than a 5th Grader game. I intend to use this in our company when we quiz our new hires on American culture. The links to the other slides work pretty fine, but I noticed that there are a few kinks that I cannot iron out.

  1. I declared 10 variables, Q01, Q02, ..., Q10, of True/False type for the 10 questions on the board. The default value of these variables is False. These variables are updated when a user clicks on the corresponding question. I also created 10 layers, Q01, Q02, ..., Q10 that display black rounded rectangles over the rectangles that link to the questions. I created triggers so that when a question is answered, the value of the variable for that question gets changed to True, and that a layer corresponding to that number is shown, therefore, blocking the link to the slide. What happens is this: if I select Q1 from the question board, (in this case, US States), the slide asking the first question appears. The participant chooses an answer, and is returned to the question board afterwards. At this point, the layer corresponding to Q01 appears, thus, a black rounded rectangle is shown over the link to the question. When I select any other question, the question slide appears, but when the participant is returned to the question board, it's either the layer for that question does not appear, or if it does, the layer for the previous question disappears.
  2. I created a variable, ScorePoints, to track the score of the participant. However, the score as shown on the question board, does not update.
  3. I have also created two lifelines for each participant: Peek and Copy. I created two layers, PeekDone and CopyDone, which are supposed appear once the Peek and Copy lifelines are used up. I also created two variables, PeekBoy and CopyBoy, which increment when a peek is made. Thus, PeekDone and CopyDone layers are supposed to appear together. However, they do not.

Here are some screenshots:

Question Board

Question Board

 Question Board Triggers

Question Board Triggers

 Question Triggers

Question Triggers

I have uploaded my project for guidance on this. I appreciate all the help.

5 Replies
Ashley Terwilliger-Pollard

Hi Jaybee,

1. The slide layers are set to hide other slide layers when they're shown - so instead of layers have you looked at using a "disabled" state for those images? You can read more about states here. 

2. In a quick look, I didn't see where you were adding any values to the ScorePoints variable you've created? If you wanted to use the built in quiz variables, look at how they're written on a results slide - you will need a results slide to track and calculate them though. 

3. Your variable triggers are set to be adjusted when the user clicks, but since it's showing the layer first, likely that trigger is never being executed. You may want to look at adjusting the order of these as described here. 

Jaybee Penaflor

Hi Ashley,

Thanks for the immediate reply. Instead of creating layers, I followed your lead on creating new states that "disable" the buttons. That seems to fix items 1 and 3 above. 

As for item 2, I forgot to mention that I declared triggers to add and subtract points to the ScorePoints variable. I created the triggers under the Correct and Incorrect layers per question slide. However, the points don't get carried over.

Ashley Terwilliger-Pollard

Thanks Jaybee - I didn't see that trigger when I first looked. I'd also look at the trigger order for this, as the variable trigger is set to occur after the user has jumped to another slide so therefore it doesn't have time to execute. 

Also, just an FYI it looks like all the question slides are the exact same question? Threw me for a second when testing... :-)

This discussion is closed. You can start a new discussion or contact Articulate Support.