Forum Discussion

StuartRosen-e72's avatar
StuartRosen-e72
Community Member
4 years ago

Can a variable be used as a layer name in a trigger?

In a game I'm creating with Storyline 360, there are 16 objects, each on its own layer. When a player selects an object, a trigger on that layer assigns the layer name to a text variable called "layerSelected."

When a player's turn is over, a trigger shows that player's end-of-turn layer, which needs to pause the timeline on the object layer the player selected. Is there a way I can use a single trigger to pause the timeline of the layer named in the layerSelected variable, or do I need a trigger for each of the 16 object layers, e.g., Pause the timeline on Object Layer 1 if layerSelected = Object Layer 1, etc.?

  • You'll notice when you create a trigger to pause a timeline, your only option is to choose either the slide, or one of the layers. There is no option to choose a variable. Triggers seem to be hard-coded and static, so I think you cannot do what you want, as appealing as it is.

    On the other hand, the new trigger workflow makes it pretty simple: create on trigger that works, duplicate it 15 times, and change the name and value without opening the trigger editor.

  • Walt, thanks for the information. I was pretty sure I couldn't use a variable that way, but I put the question out there, just in case.

    I agree, with the new trigger workflow it won't be hard to do.

    Thanks again!