Possible to customize path depending on variable?

Oct 12, 2016

I am creating a learning module on MRI safety. People with different roles need to see a unique set of slides. For example, physicians need to see these slides:

[1,2,3,6,7,10,11,...]

while nurses need to see these slides:

[1,2,3,5,6,8,12,...]

and MRI technicians needs to see these slides (all):

[1,2,3,4,5,6,7,8,9,10,12,...]

To start I have added a slide at the beginning that asks the person what their role is (using radio buttons) and stores the answer in variable UserRole.

But now I'm trying to decide how to create a custom path for each role. I don't want to copy and paste the slides into separate scenes because in reality there are 8 roles, and >100 slides. So preferably I could set up the navigation to skip certain slides depending on the variable in UserRole.

So how would you do this?

My initial thought is to use conditional statements on the triggers for the Next and Prev buttons, but what I really would prefer to do is to use some kind of array for each role using javascript, but is that even possible?

5 Replies
Michael Hinze

It's certainly possible to build an array that correlated roles and the next slide using Javascript. But you would still have to have conditional triggers in SL to actually execute the jumpTo. Wit that in mind, I would do this with conditional triggers only. Check out this example here which provides navigation based on a previous (completely random) selection of topics (these could be your roles). Yes, it does take a lot of triggers but at least the logic is contained within Storyline, without the added complexity  of JS. That's just my opinion, I could be wrong.

Will Findlay

That's great! You don't happen to have the .story file for it by chance?

I think what I will do is set up a trigger so that every time someone clicks next they are taken to a special next slide, and every time someone clicks prev they are taken to a special prev slide. Then I will set up >100 triggers that navigate to a slide corresponding to a variable (by using conditions). That way I can read the variable from an array and it will route the person to correct slide.

Will Findlay

Thanks!

This is going to be helpful as well: https://community.articulate.com/discussions/building-better-courses/demo-menu-toolkit-for-articulate-storyline

Until I saw this I had no idea you could set triggers on the Master Slide that applied across all of its child slides. And I never thought of storing an array as a text variable and then converting it to an array in the javascript!

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