States not changing on layers
May 26, 2016
I'm at the end of my rope here. I have a slide with 6 layers, and multiple hotspots (radio buttons/regular buttons, to be exact) on each layer. Each hotspot leads to a quiz question lightbox. On the lightboxes I have programmed variables according to the user's answer: "when Radio button 1 is clicked, change variable_red to true". Then, on the original layer, I have the command to "change state of X to Red if variable_red = true". But none of these custom states are working.
I've tried using text variables, counting variables, and true/false. I've tried changing from "when timeline starts" to "when variable changes". I've tried recreating the items themselves on both the layer and the lightboxes (originally radio buttons) to regular buttons. I've tried putting the command on the actual item timeline, and on the layer timeline. I've also tried deleting all the variables and starting over, and tried importing just two sample screens to a new project and starting from scratch. Nothing has made any difference! Please help.
11 Replies
Hi Leslie! Any way you could share a .story file containing the slide(s) you're having trouble with?
This is the test version with nearly all the variables removed. The item I'm testing in on the Exterior layer - the "Turn Signal" button top center of the screen. The original radio button states weren't working, so I created a new button with hover states and added an oval with several custom states. The variables are tied to the oval. No matter what I've tried, that oval stays in "normal" state.
Check out the attached file. I know you said that you had tried changing your triggers to "when variable changes" without success, but it seems to be working here.
To keep things clean, I also added a couple of triggers on your turn signal lightbox slide to reset both of your variables to "False", so that if any learners click on the button again and choose the opposite choice you've still only got one variable that's "True".
It was working without this, but whenever possible I try to avoid conflicting conditions, such as both red and green are equal to true.
I added a couple of references to the exterior layer so that I could confirm the variables are changing appropriately, which can be removed when you no longer need them.
Another way I've done this before is to tie the reset triggers directly to the button or hotspot. For example, when user clicks on the green button set variable_red to "False" and add a second trigger to set variable_green to "True".
This isn't a bad option for a couple of variables, but if I were working with something where there were a lot of options it's less work to just add slide/layer level triggers, such as I did, to reset your variables.
Thank you Brian! I will test this out. Good idea adding something to show where the variables are set. I am going to end up with roughly 200 variables in this little exercise, I think, and right now we don't want them to change their answers (but that's not certain enough to disable the buttons) so I'd rather not add extra ones, but that's also good to keep in mind. Appreciate the help.
You're right, that variable language appears to work for the Button/oval combo. It still doesn't help the original radio buttons I had, but I can delete those, at least I have a workable solution. Thanks!
If only learners didn't do what we don't want them to do, lol. I don't know how many times I've done user testing on a course and end up completely frustrated because they clicked on buttons more than I expected them to.
Good luck!
Agreed, changing states on radio buttons this way seems a little buggy...
Aha! So there is something wonky with the radio buttons. I suspected that...90% of my time and frustration was trying to make those work, lol.
They seem a little wonky to me, anyways... I've had mixed luck changing states on them.
If I stick with changing the state to "Selected" or something like that I'm usually fine....
Yup, that makes sense. They all kept going to "Selected" instead of my custom states. So they were partially working, I guess? Even deleting the Selected state didn't help my poor color states though. Thanks again for the help :-)
This discussion is closed. You can start a new discussion or contact Articulate Support.