Variables and Triggers to Show Layer
Mar 02, 2022
By
Stacie White
I need some help since I am not a variable expert!
I have a slide with 5 buttons that correlate to 5 layers. The learner needs to click all 5 buttons but they don't have to be in any particular order. The issue I am running into is showing a new layer or next slide based on the 5 layers being visited.
What I have done: Created a trigger on each layer that sets a variable to true when they click the layer close button. On the main slide I have tested 2-3 different triggers to either show a layer based on the true variables. Nothing I do works and it is driving me nuts.
Any thoughts on how to show a layer or next slide based on viewed layers? Thanks.
12 Replies
Hey Stacie and welcome to E-Learning Heroes! š I have a few ideas, but it might be helpful to see how you've it set up. Are you able to share the story file?
Hi Sarah - I can share a screenshot of the slide and 1 of the 5 layers (they are all set up same way). I hope that works.
Hi there. You need to check that each variable is set to True.
For troubleshooting you can also create Text boxes but using the %variableName% as the value (your variable names have a % sign at the beginning and end.)
You can see it in my screenshot %var1%
This will display what the variable value is.
Thanks for you thoughts, Graeme. The problem is I don't want to have to click anything to show layer 6. I want learner to go to layer 6 based on the conditions of the other 5 layers as being true. The way I am reading your reply is that they have to click button 6 and the layer 6 will open only if the other 5 layers = True. If you are saying something else and I am not following, I apologize.
Thank you for giving me the variable info to put on screen.
Thanks for sharing your solution, Graeme!
Stacie, I think that might be happening because the slide is saving the resumed state so the FinishedReveal variable won't change when the timeline starts since it has already started.
Another option would be to set each variable to True when the timeline starts on the layer. And then show layer 6 when the user clicks the icon if all the variables are True. I went ahead and made a mockup example (see attached) so you can see all the variables and triggers I set up to make it work. I hope that helps!
I Stacie.
I understand the problem you're encountering.
I need to sign off for the day but I think what will work is on the close buttons of your layers (where the variable is set to True) you need to place that if statement as well.
So every time a learner closes a layer the triggers check if all variables are True (make sure the IF is only done after the variable is set)
Then if TRUE is met for all variables show the SuccessLayer
Step1. Set variable to TRUE when closing layer
Step2: Check IF all varaibles = TRUE
Step; 3 if yes to Step 2 show SuccessLayer.
I'll check this thread first thing tomorrow and if there is still no solution I'll take another look
My above solution will encounter a problem if not all variables = TRUE as you won't be able to escape the layer then. :(
Trigger order if successLayer can be a new slide:
1. Set variable = TRUE
2. GOTO SuccessSlide if all variables = TRUE
3. Close layer
Because triggers are done in order the GOTO trigger will happen first and the Close layer trigger won't be able to be done becuse you have already changed slides
Graeme's comment on the jump command is correct; if you jump to a different slide, none of the triggers that are below the jump command are executed, but if you stay on the same slide, they all are.
So you can use his previous suggestion without being trapped.
Create all these triggers to fire when the layer close button is clicked:
1. Set variable to true
2. Hide this layer.
3. Show success layer if all variables are true.
Thank you, Sarah! This worked beautifully!
Thanks, everyone for helping me out. This was my first time on the community asking for help and it was awesome! You are all rockstars :)
Iām so glad! And I'm happy you had a positive experience. The community members are so awesome and helpful! (Iām looking at you Graeme and Walt š)
Let us know if you have any other questions, Stacie! š