Forum Discussion

HywelWilliams's avatar
HywelWilliams
Community Member
1 day ago
Solved

Branching, variables and condition problems

Hello heroes, seeking help. For branching, controlling course progress I have generally used visited states and hide/disable until X, Y, Z is visited.  Rsearching on here suggests variables and condi...
  • JudyNollet's avatar
    1 day ago

    Kudos for your efforts to learn variables and conditions! Those provide the real power in Storyline.

    When the connected content is shown via layers on the same slide, you don't always need variables to track completion. That can often be done simply by checking for the state of all the buttons to be Visited.

    • There's more info and a demo file in this post about controlling the Next button. (Note that the same programming could be used to control a custom button for continuing the course.)

     

    When the connected content is shown via jumping to other slides, that's basically a custom menu slide. In those cases, it is good to use T/F variables to track that the linked content has been completed. I usually trigger each variable to change to True when the user reaches the last slide in the corresponding content.

     

    I'll point out a few issues I spotted in the files you attached. 

    You don't need this trigger to change an object to Hidden when the timeline starts. Instead, just set the Initial State of the object to Hidden. 

     

    Trigger order matters. Storyline can only run a slide's triggers while it is on that slide. So a "jump to" trigger has to come after other triggers that have the same "when." 

     

    In conditions that check states, it's more stable to use "≠ (is not) Selected" or  “≠ (is not) Visited" instead of "= (is) Normal." As the late, great legend Walt Hamilton put it: like us, the built-in states all think they are Normal. In other words, Normal underlies those states, and the "= Normal" condition doesn't always work as expected.

    Also note that when conditions are connected with "and," the trigger will only run when all of the conditions are met. When connected with "or," the trigger will run when any condition is met.

     

    In case you're interested, here's my post about branching in Storyline. That has a file that demonstrates how to navigate based on a chosen path.