Forum Discussion

LauraWinzen-c4c's avatar
LauraWinzen-c4c
Community Member
2 years ago

Using multiple variable conditions in a trigger

I have a slide with three buttons. Each displays a layer, sets a unique variable to True, and displays a button to return to the base layer. Once the user has visited all three layers, in any order, and all three variables = True and the user is back on the base layer, I want a layer displaying a Continue (to next slide) button to appear.

What I would like is a Trigger that reads, "Show layer Continue when all three variables = True." But I can only indicate one variable, not all three in the When field of the trigger. I can list the variable values in Conditions, but I have no When. Users can select the buttons in any order. I don't want them to have the option to Continue until they have visited all three.

I tried using "when timeline starts" with the variables values in Conditions, but the Continue layer did not display. I added a textbox with the variables referenced for troubleshooting. All three are setting to True when desired. Why is the Continue layer not displaying and how can I make this work? 

Thank you in advance!

  • "When the timeline starts" happens before the user clicks any of the buttons to view the layers that change the variables. So that trigger won't run when you just close the layers. 

    It will run if you add a "jump to slide - this slide" trigger to the buttons that close the layers. 

  • Trigger should be when variable changes and you need one trigger for each variable. 

  • I should have posted this trigger screenshot before. I believe I am doing what you are both suggesting and I know the variables are working correctly because I made them visible - but the Continue layer is not displaying. 

     

  • I would do on when variable changes you could do on button press but needs more triggers

  • Hello, I have a grid with nine boxes that I want learners to click. I've set it up so that each box toggles between states ("normal" and "clicked") when it's clicked. I created the variable "v_box_count" with a beginning value of "0" to count the number of boxes that have been clicked. I also created variables for each box: "v_clicked1", "v_clicked2", v_clicked3", "v_clicked4", v_clicked5", v_clicked6", v_clicked7", v_clicked8", and "v_clicked9". All of those variables have a beginning value of "false" and toggle when the learner clicks the corresponding box. I want Storyline to count each box click and display the number in the box in the order that it's clicked. If the learner clicks the box twice in a row, I want Storyline to remove that click from the count and return the box to its normal state. At the end, I want all nine boxes numbered in the order they were clicked. The problem I keep running into is that as other boxes are clicked Storyline continues to update the "v_box_count" variable (regardless of the "v_clicked#" value for that box). How do I work around this? Thank you!

  • You say when a box is clicked twice in a row. What if a learner clicks four boxes, and then wants to go back and unclick box two? Do you want to allow that? and then have all the clicked boxes change their order?  “Once clicked, always clicked” is a much different implementation.