Using a variable to show a layer

Oct 07, 2022

Hi all! I'm updating a project that I didn't create. For some slides it uses a variable to act as a "Layer count" and then triggers are used to click next to show a layer, rather than the next slide. However, I noticed that it doesn't work. I've tried to fix it but can't. I'm not even sure a variable can be used to do this. 

The base layer shows the first/next layer straight away. The user clicks next and is supposed to see the next layer. Instead, it skips a layer, and goes the layer after, which is the last one.  

So the result, is that the middle layer is not shown and skips to the end. 

I've attached a project that shows only this slide and taken out our logo. 

Also, it looks like the original designer intended for some action to happen in the middle layer not seen, but it didn't make any sense as there was no instructions for the user. Therefore I have disabled these two triggers, so please ignore them.

My gut feeling is... what the original designer was trying to do isn't possible, but thought I'd field out to the experts. Thanks in advance!

3 Replies
Judy Nollet

It's possible to use a variable so the Next button will move between layers. But that just makes it more complicated to program. For example, what happens if the user clicks Prev? And, personally, I think using that makes it more confusing for the user. The Next button should be reserved for slide-to-slide navigation, not navigation within the slide (IMHO). 

I think it'd be better to replace the "Click Next to continue..." text box with a "Continue" button that shows the next layer. That's simple to program, and then the Next trigger can just be "go to the next slide" as usual. 

To ensure the user steps through the layers, you will need a variable.

  • Create a T/F variable with the default value of False. For example, call it Tea_Done. 
  • Add a trigger to the base that disables the Next button when the timeline starts -- with the condition that Tea_Done = False. 
  • Add a trigger on the final layer that changes the Next button to Normal.
  • Add a trigger on the final layer that adjusts Tea_Done to True (so the Next button won't be disabled if the user returns to the slide). 

As for those mystery triggers: they change object states, apparently to make it look like the tea is served and then drunk. But, as you noticed, they occur when the user clicks the picture--which they have no reason to do. So you could either have those triggers occur at a specific point in the timeline, or just delete them. 

Side note: It would be so much easier to work with this if the initial developer had given the objects meaningful names. It's especially important to name anything that's part of a trigger. So you might want to rename things for future reference. 

Elizabeth Young

Thank you both so much for your replies., it's really appreciated. Judy I agree that it's a bit of pain to use layers in this way and I'd not considered the previous button. but was curious as to what the original designer was trying to do.  

Michael, indeed that does do the trick thank you, seems like they were bit off. Thank you so much for your help.