Use a variable in one scene to trigger action in other scene?

Aug 05, 2014

I'm wondering if it is possible to use a variable on a slide in one scene to trigger an action on a slide in a separate scene.

For example, I want to use a course menu slide. The learner selects one of the 3 lesson options on that slide, goes through the material, comes back to the menu slide, chooses another options, etc. Once all of the menu options (lessons) have been selected and seen, the Continue button on the menu slide displays, taking the learner to a course summary and evaluation.

I thought perhaps I could set a variable on the last slide of a lesson to change to a value of "1" when the timeline starts (or some other trigger). I would do this for each lesson, setting a separate variable for the last slide in each lesson. Then on the menu slide I would say that if those variables had all be set to "1" the Continue button would change its state to "normal" and appear.

This isn't working. Should it?

Thanks for any guidance you can provide,

Karen Phelps

5 Replies
Greg Faust

I don't know why your triggers aren't working, and I doubt anyone's likely to guess without seeing them. Your thinking seems sound, though.

Personally, I'd have used True/False variables rather than numeric variables set to 0 and 1, but that shouldn't affect the functionality of your presentation.

Let's see...

To help you debug, create text boxes with text (replace "Section1Viewed% with the name of the variable you're using to track if section 1 has been viewed).

Section 1 Viewed: %Section1Viewed%

This way, you can tell if the triggers to set your "has been visited" variables are working correctly.

Then there's the trigger that makes the "Continue" button appear. What does it look like? If it's on the Menu slide, it should probably be a "... when timeline [of SlideName] begins" trigger. If you did a "... when variable changes..." trigger, that wouldn't work, because the variables in question never actually change while you're on the menu slide.

I dunno. Hopefully that helps? If not, please give more information?

Kevin Thorn

HI Karen,

Greg's solution (and testing) should work just fine.

What you're wanting to do can also be achieved without the use of variables. Crazy, I know!

Leveraging the "Visited" state of your menu buttons is another approach.

  • As you have it, set your final Continue button to initially Hidden.
  • Slide trigger: Change the State of [Continue button] to Normal when the State(s) of Button 1 AND Button 2 AND Button 3 are in their Visited State.
  • The only drawback to this is setting that slide's properties to "Resume Saved State" when revisiting.

Learner clicks Button 1 and proceeds through that material. Returns to the menu slide with that button visibly "visited". Learner clicks Button 2 and proceeds through that material. Again, returns to menu slide to see two of three buttons visited. Learner clicks Button 3 and proceeds through material. This time when the learner returns to the menu slide, all three buttons will appear visited and the Continue button will be Normal.

******

Like Greg mentioned, a T/F variable in this case would work more efficiently than a Number variable. The reason is Number variables can get out of hand if a learner wants to revisit a section they've already visited or completed. Your count may get skewed.

  • Create three T/F variables for each section. Section1, Section2, Section3. Set all to initial value of False.
  • On the last slide of each section create a Slide trigger: Adjust Variable [Section1] to True when Timeline starts. (do the same for the other two respectively).
  • On the main menu slide create a Slide trigger: Change the State of [Continue button] to Normal on the condition that Section1, AND Section2, AND Section3 are all TRUE.

Using this method avoids buggy behavior because variables aren't associated to a slide's state. The trigger to change the Continue button is evaluating the variable's value and not dependent on the timeline or the state of any objects. Also, if a learner wants to revisit a section, the variable for that section has already been changed to True so it won't affect the trigger for the Continue button.

Either of these should work just fine. There's a hundred different ways to do things in Storyline so it's just a matter of what you're comfortable building (and managing) and ultimately the user experience.

Good luck!

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