Forum Discussion

WilliamRyan-dba's avatar
WilliamRyan-dba
Community Member
3 years ago

Toggle Variables

Hi All, I have an interaction I want some help with...

I want to change a variable Q4_3_PS4a_V, whose default state is False, to True, when a user clicks on hotspot PS4a V

If the variable has been changed to True, I want the state to return to False, if the user clicks the hotspot again. 

I added the triggers as shown below. The default state of False changes to True as expected. However, it stubbornly remains True, it does not go to False as I would like. 

If I change the order of the triggers, the state does not change at all. 

What am I missing here? Any help is appreciated... 

  • Hi, William.

    Have you considered using the toggle variable trigger, instead?

    Windows 10 (1) 2022-04-29 at 1.33.28 PM

    That way only one trigger is required, without conditions. 

    Let me know if this works!

  • Maria's suggestion is the only way to do what you want, because every time you click it executes both triggers. So, if the variable is true, the first trigger changes it to false. Then whether it started true or false, the second trigger changes it to true.

  • Well I'm feeling like a genius right about now... 🙄. I lost hours with this, and I don't know how many times I opened the trigger interface.

    Thanks both, for your help.