Button Set State/Variable Issue

Sep 02, 2021

Good day. I have a slide with 5 buttons that I can't seem to get the variable to work correctly. Here is what I would like it to do:

  1. User clicks button #1, the layer shows and then hides at the end of the timeline. This triggers button #2 to change to a normal state. Button #1 goes to a "watched" state.
  2. User clicks button #2, and it works the same as #1 but triggers button #3 to a normal state and so forth.
  3. If the user clicks on any of the previously watched layers, the next button in line does NOT go to a normal state but rather stays in a "watched" state (if already in this state).
  4. I've created a variable that the button is changed to "True" when the user clicks the button.
  5. Finally, I have a trigger on each button that changes the state of the button to "normal" from the default disabled state only if the watched variable is a value of False.

It works perfectly for button #1 and #2 but after that, the state of #3 stays disabled. I've doubled checked the variable and trigger and everything is the same as #2 so I'm stumped as to what the problem is or I'm crossed-eyed and don't see it. I've attached a sample file so you can view my mess.

Any help from the community is greatly appreciated. Thank you.

2 Replies
Ben McKenna

The reason the first button works is because the Watched variable starts as False (which meets the first condition check requirements), then gets set to True, but never gets set back to False (so the other condition checks never pass).

If you set it back to False on each slide layer, your buttons will revert back to their normal state though (which it sounds like you don't want). Instead of relying on a global 'Watched' variable, it's better to reference the states of your buttons for the condition checks, since the variable doesn't know which video was watched (whereas the states sorta function as their own 'local' variable).

I've also set the layers to prevent clicking on the base layer, so the user can't activate two layers at once.

https://360.articulate.com/review/content/beec8209-e281-4c7d-85d6-c29fab41fd68/review