Storyline 3 variable triggers on other layers

I have a course that relies heavily on variables. After updating it to SL3, some variables did not work as expected. After some debugging, I found that the problem is that variables are manipulated by triggers on other layers.


I have a variable that counts clicks on an object and triggers actions. On one layer I limit the variable to 4, i.e. if it increases to 5 it resets to 4. On the next layer I limit it to 2. The problem is that the trigger on the second layer is also active on the first layer, so I can never get the variable above 2 (until I delete the trigger on the second layer).

This cannot be by design, and it's not like that in SL2, so I figure it must be a bug.

12 Replies
Walt Hamilton

Actually, it is like that in SL2. Variables are global, which means that any variable is available to any object anywhere in the entire project.

Triggers, by contrast, are active only when their initiating event occurs. So I wonder, how is your trigger "active" on both layers at the same time? Does it initiate when the layer shows, or when the user clicks a based object?

For example, this is how I imagine what you are describing: Layer 1 has an object - rectangle1. When clicked it adds 1 to Variable1, which resets to 4 if it is greater than 5. Layer 2 has a different object, but still named Rectangle 1. When clicked it adds 1 to Variable1, which resets to 1 if it is above 2. Even if they have the same name, these are two separate objects, and initiate a different sequence of triggers when clicked. The trigger on layer 2 does not constantly monitor the variable and reset it if the other trigger changes it to 3, or 4. The trigger on layer 2 only resets the variable when it is initiated, or fired. Now, if it is fired by the showing of the layer, or the change of the variable, I can foresee problems. If the trigger on layer 2 is fired only at a user action, you will not have this problem, unless one or both of the rectangles has both the trigger to limit the variable to 2, and the one to limit it to 5.

If this worked in SL2, something did not update correctly.

Tom Lund

Thank you for your reply, but you misunderstand the issue. I know that variables are global. Like I said, my project relies heavily on variables, and I use hundreds of them. But like you also point out, triggers are not. But that's excactly the problem here; the trigger on layer 2 fires when layer 1 reaches the condition it monitors.

The trigger on layer 2 is as follows: "Set VAR equal to 2 when VAR changes if VAR is greater than 2". This is a layer trigger. The object trigger on layer 2 only increases the value of VAR by 1 when clicked. On layer 1 it's exactly the same, but here the VAR limit is 4, not 2. But when the VAR reaches the value 2 on layer 1, it stops increasing. So the layer 2 trigger fires on layer 1.

This must be a bug. The problem is not the variable, it's the trigger. It's not like this in SL2.

There are easy workarounds, but it's still a bug that should be fixed.

Walt Hamilton

Actually, what I misunderstood is the way this works in SL2. I thought that the variable watcher on layer 2 would always be active, but it isn't. In SL2, that trigger doesn't watch the variable until (in my test) it is activated by showing the layer. Once the layer is shown, the watcher is active, and even if the layer is hidden, it still prevents the variable from rising above 2.

So while I thought this would never work in SL2, it turns out that it will work for layer 1 only if layer 2 has not been visited. If you visit layer 2, then return to layer 1, it does not work. In SL3, obviously, the variable watchers (regardless of position) are active from the moment their slide is active, rather than from when their layer is active.

My personal opinion is that the layers are part of the slide, and should always be active, visible or not. So I think the bug was in SL2, and they corrected it in SL3, but opinions may vary.

Tom Lund

OK, I see. That might be, as I've never tested that behavior in SL2. However, I disagree with you that this is a feature and not a bug. To me, it's very counter-intuitive that a layer trigger should affect other layers. If you need that behavior, you put the trigger on the base layer, as a slide trigger.

I've made a small project to illustrate the problem, if anyone's interested.

Leslie McKerchie

Hi Tom,

Good news! We fixed the issue you reported where:

Trigger on another layer is active and gets executed controlling the variable on the currently active layer.

Install the latest Storyline 360 update to take advantage of all the recent features and fixes. Here's how.

If the problem happens again, please record a Peek 360 screencast for me, and I'll be happy to help!

Chris Ansari

I've run into this bug today using Storyline 360 v3.33.20625.0.

I've four text entry fields on my base layer, each entry field's variable requires 12 triggers, and each one of those 48 triggers has four conditions. In order to keep the triggers organized and easier to follow, I created four layers – one to house each variable's set of 12 triggers. I planned to then show all four layers when the base timeline started to enable all 48 triggers.

I began testing the slide part way through development and found that the triggers on my layers were enabled and triggering when I thought they shouldn't be, since I hadn't yet triggered those layers to show.

Lucky for me this bug won't impact what I'm trying to accomplish, it even saves me four Show Layer triggers, but I got curious about how it was working and came across this thread so I figured I'd chime in with my experience.