Adjust variable when layer X is visible

Jan 15, 2020

I have a slide with multiple layers launched with buttons from the base layer. I have a variable (V1) that turns True once all said buttons are visited. I have a rule for the built-in Next Button to move to the next slide on the condition that V1 is True.  The problem is that this condition is met before the user closes the last visited layer and returns to the base layer. This would be easily solved with a condition "...AND BaseLayer=Visible" except I can't seem to find any built-in layer.active type options. Objects have states I can trigger off, but layers don't seem to have anything equivalent. Is there something I am missing? If possible, I would much prefer to stay away from a variable the value of which requires multiple (per layer) trigger entries.

2 Replies
Walt Hamilton

There aren't any options like you want. Fortunately, nothing on SL has to work a certain way; it only has to look like it does (its all smoke and mirrors). That means you don't need to know the status of visibility of any layer; you can just close the one(s) that show.

You could use the action that changes the variable. For the first trigger, create one that hides the layer. For the second trigger, use the one you have that changes the variable.  If V1 can be changed to TRUE from multiple places, that would require a trigger in each of those places.

On the other hand, if there is only one trigger that moves to the next slide, then you could place the "Hide Layer" trigger right before it.

You can hide any layer that is showing, even if you don't know which one it is, and even if you aren't one it.

1. Create a layer with nothing on it

2. Set its properties to hide other layers

3. Give it a trigger to hide itself when the timeline starts

Showing it will Hide any layer that is showing

Joanna Waligora

Thank you for confirming. I ended up implementing multiple triggers that toggle a variable when each of the non-base layers is activated and subsequently closed. It's then used in conjunction with V1 to enable the Next Button. I'm not too fond of all the noise it created, so your magic layer idea is looking pretty sly in comparison. I will test it out. Thanks again!

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