Forum Discussion
Branching If/Then Navigation Question
Hi all,
I'm a little frustrated that I can't get this right. I haven't found anything when I search, but I don't know what search terms to use. Here's a basic break down of what I have.
I have Scene 0. On it are two buttons.
Button 1 is correct and goes to Scene 1 which has multiple slides.
Button 2 is incorrect and goes to Scene 2. It has a consequence slide with a Continue button that goes to the beginning of Scene 1.
On the first slide of Scene 1, I would like the previous button to return to Scene 0 if Button 1 was selected OR, return to the end of Scene 2 if Button 2 was selected.
I thought it was simple triggers but I get stuck in a loop and I think I need a variable. Would anyone be able to help?
Return to the If the learner selects it, they go to the second slide of the correct response.
- AndrewHanleyCommunity Member
Are your slides with buttons (Scene 0) set to "Reset to Initial state"?
Once the initial state is set, then you probably just need a T/F variable which can track whether the user clicked the correct/incorrect buttons in your choice slide.
Alternaitvely, you could let Storyline do the heavy lifting for you, and use Freeform question slide, and then set the BRANCHING properties to the slides you want for each choice.
- KrisShenenbe782Community Member
Hi. All of the slides with choices are set to "reset to initial state." How would I do the things you're suggestion?
- AndrewHanleyCommunity Member
So first, in your Variables window, add a new T/F variable and call it something like "button2Pressed". It's starting/default setting should be FALSE.
Now, on your Button 2, before the "jump to slide" trigger, add a new trigger which says "Change state of button2Pressed to TRUE when User Clicks"
Finally, on the first slide of Scene 1, find the Prev button, and delete the trigger that is there.
Add 2 new triggers to the Prev button:
Jump to Slide <end of Scene 2> when user clicks, if button2Pressed = TRUEJump to Slide <Scene 0> when user clicks, if button2Pressed = FALSE
Thats it! :)
- AndrewHanleyCommunity Member
An explanation overview:
So what we are doing is simply telling the PREV button to behave differently based on whether the user has clicked the "wrong" button or not.And Storyline knows whether the've clicked that "wrong" button because as soon as its clicked, the variable will stay TRUE, otherwise it will be FALSE.
- KrisShenenbe782Community Member
Thank you so much! It makes sense that the change state trigger is first. I'll have to remember that trigger order is as important as timeline and layer orders.