Forum Discussion
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 conditions is a more stable and consistent method. In trying to evolve as storyline user, I have tried to use variables and conditions for a simple branching scenario course and cannot get it to work reliably . i.e - land on a slide, 2 options (buttons), select option 1, must go back and select option 2 before moving on. My approach has been to hide a "move 0n" button and the player "next" button until both buttons have been selected. I have tried this using slide branching and layers. Clean copies of both are attached. Very grateful if someone can advise what is happening/not happening here. I suspect is straight forward but I can no longer see the wood for the trees. Thanks in anticipation.
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.
- There's more info and a demo file in this post about custom menus.
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.
3 Replies
- HywelWilliamsCommunity Member
Thanks Judy, much appreciated and very helpful to understand some of the idiosyncratic behaviours in Storyline. Legend indeed!
- JudyNolletLegend
You're welcome! Pay it forward when you can. 😊
- JudyNolletLegend
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.
- There's more info and a demo file in this post about custom menus.
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.