Forum Discussion
Variables on layers
I'm seeing some unexpected behaviour in Storyline 3.93.33359.
I want a button (or another hypothetical action) to show different layers based on a true/false variable -- in a simple example, if the variable is false, the button should show layer 1, or if true, layer 2.
I want this to happen in sequence, so after layer 1 has been shown, the button should show layer 2.
So I have a button on the base layer with these triggers:
And a trigger on layer 1 that sets the variable to True on timeline start:
Both layers are set to pause timeline of the base layer and prevent clicking on other layers.
What I would expect to happen is this sequence:
- User clicks button.
- Layer 1 is shown
- Variable is set to true
- User clicks button again
- Layer 2 is shown
Instead, layer 2 is shown on the first click.
I can't work out why this would be except if all these steps were being played at once. But you'd expect layer 1 timeline start to be necessary to show layer 2 on click, and layer 1 timeline won't start until after the button click.
I can't prove it as I am prevented by work policy from installing a previous version, but I think this was working differently in an earlier version as I implemented a few layers this way and didn't notice any issues until recently.
I've attached a Story file for reference.