Forum Discussion

VeronicaThompso's avatar
VeronicaThompso
Community Member
4 months ago

Variable not working across all layers on Multi-answer Quiz

Hello, I'm hoping to find some support with my variable work on a slide. I just can't seem to figure it out.

I have a multi-answer quiz question. I'm building 2 sets of unique layers for each answer combo - for the first attempt and for the 2nd attempt. 

I have a variable "Attempt_2" set to "0" at the start of the base layer. When any answer option is selected, it adds a "1" to the count in which it loads the first unique layers based on the selection. When it reaches "2" counts (2nd attempt), it's supposed to load the "2nd Attempt" feedback layers based on the selection. 

This works great for Layers 1,2, and 3. The first layer works, and then on 2nd attempt, the second "2nd attempt" layers load respectively. 

However, for the life of me, I can't figure out why it doesn't work for Layers 4B and 4C. For these two, somehow it doesn't register the variable as "2" on the second attempt, so it never loads the "2nd attempt layers" - it just keeps loading the first layer for each.

Is there anyone who might be able to help? I've got the storyline file attached. 

Thank you in advance!

 

  • Hi Veronica. The story file you attached did not seem to have any triggers for showing any of the second-round layers.  Duplicating each of your layer 1, 2, 3, 4b, and 4c triggers, changing the target layers, and adding conditionals to them all to check Attemps_2 seemed to do what you wanted.

    Here's a few notes:

    Not all answer combinations are accounted for, but you are still incrementing the Attemps_2 counter. It is therefore better to check if the counter is greater or less than your target value, rather than equal to it.

    You will need to check the Attemps_2 variable in all of the triggers (either <2 for 1st try, or >= 2 for 2nd try).

    If an unchecked answer combination is selected first, the next valid attempt goes straight to the 2nd-Attempt layer.

    You might want to put the maximum number of attempts into a variable, and then use the variable in the conditional checks. It makes it easier to quickly change the number of allowed attempts without retyping.

    The variable Attemps_2 is missing a 't', so it is easy to mistype when troubleshooting.

     

  • Dear Nathanial,

    I appreciate your guidance and support SO much! I now understand how you approached the fix and can start applying that as I continue creating the remaining feedback layers. I got stuck at 4 and couldn’t continue building without figuring out this piece first.

    Where I went wrong clearly was trying to add the variable triggers to the 2nd attempt layers instead of the base layer, which I’m assuming was the main reason the variable wasn’t running and launching the 2nd attempt layers.

    I completely see your point with having the counter track greater or less than the target value (2), rather than equal to it. Also, I went ahead and updated the variable title. Thank you so much for catching that!

    I’ll go ahead and experiment with adding a maximum number of attempts into the variable and using conditional checks. 

    Appreciate your guidance again, greatly!

    Best always,

    V