Radio button state tracking doesn't work with trigger conditions help
Dec 16, 2021
Hi,
I'm trying to show 1 of 3 layers, after a user clicks a button.
The layer shown will depend on which of 3 radio buttons are selected.
In this case the layer 'Correct' will open if Radio button 1 and 3 is selected and Radio button 2 is normal.
Layer 'Wrong' will open if Radio button 1 and 3 is normal and Radio button 2 is selected.
Layer 'Almost' will open if any other combination is chosen. Including no radio button selected, all selected and any of the other combinations. There is an individual trigger for each of these.
BUT if I select all 3 radio buttons for example, then every layer is opened. It's as if the condition prefix 'and' doesn't work and is interpreted as the prefix 'or'.
I've attached a culled version of my project.
I've been able to jerry-rig a solution - but it only works if I don't include a trigger for No Radio buttons selected. I also have a question with 4 possible answers and there it gets completely out of control trying to jerry-rig a solution and I simply can't do it.
So am I doing something wrong or is Storyline bugged in this regard? Is there a way to do it differently? Can you fix it on your end? I've run into this problem for the past 3 years and finally thought I'd ask here for you to fix it.
4 Replies
Hi, Asbjørn.
Thank you for sharing your .story file and for making me laugh with the name of the file! 😄
My suggestion is to change the triggers that say "if the state of the button is Normal" to "if the state of the button is NOT selected".
I'm attaching the edited version here.
Let me know if this works!
Maria's suggestion works because "Selected", like most of us, thinks it is normal. "Selected" is a "Normal" state, and reports itself that way to an IF statement.
Thanks for the solution, it works wonderfully!
But damn that's a weird way to set it up. :)
@Walt Hamilton - That's so strange, seeing as there is a state called Normal and other states being considered Normal as well. :)
The other built-in states are actually overlays of Normal. To see this in action, edit a state like visited or selected, deleting the original object in the state and replacing it with another. The result is easier to see if the replacement object is smaller or transparent.