See how blending a little bit of JavaScript into your Storyline 2 courses can help you get more out of your variables. Read this blog post for additional context.

View demo.

Alex House

Hey Mathew, As Zsolt mentioned in his article, it is possible to do the above scenario with triggers and conditions you will just need a lot of them. So for example one way to replicate the above slide could be done like this. - Create 5 True/False Variables (i.e var1, var 2, var3 etc) set all to false - Create 1 number variable and set it to 0 - Create 5 buttons (ensure they have a selected state to reduce triggers* Also delete the visited state if they have one) - Create 1 shape to act as the door in this example. Ensure it has an open state (custom state) So for the door to open any 3 of the 5 buttons have to be clicked on (i.e be in the selected state). Our true false variables, will tell us when the buttons are turned on and our count variable will help us keep tra... Expand

Mackenzie Moyer

I'm going to try this! It definitely looks faster. Just a heads up for those who don't yet know: you can toggle T/F variables in Storyline directly. I'll give the rundown, let me know if anyone wants me to mock up a SL2 file. Steps to toggle T/F variables: 1. Make T/F variables. 2. Make new triggers, changing the OPERATOR choice to "=NOT Assignment" when the user clicks one of the choices. This is "Toggle" in English (!= in JS): false becomes true, true becomes false. Number variable: 3. upon clicking the button it's related to, trigger an adjustment in the number variable +1 or -1 , depending on whether the T/F variable is true or false. 4. also trigger the door to open when the user clicks one of the buttons IF the number variable is greater than or equal to 5 (****in the t... Expand