Variables and OR statements not working
Sep 27, 2014
By
Rick Nusz
I have a very simple story file attached. I have 3 simple true/false variables, one of which is set when a learner clicks on a shape. When one of the variables is true the course advances to the next slide and should display the shape that was selected. The shapes are on the 2nd slide but they are hidden and they stay hidden even though one of the variables is true. Am I missing something? Thanks for any help in advance.
Also, combining variables with OR does not seem to work. A statement like 'Don't do this until X or Y or Z is True. Or it doesn't work for me.
PS - I did look around the forums but I didn't see anything similar.
5 Replies
The "When variable changes' option is limited to the slide where is change actually happens, in your case that is slide 1.1. Change the three slide triggers on slide 1.2 to 'When the timeline starts'.
Um... I understand that it works and thanks for pointing out that that variables only change when they are changing (that should have been obvious to me). I don't really understand the Object part though. The object I want to change based on a variable is the circle, square, or triangle. I think I'm missing something key here. Why am I saying......... Nevermind, saying it out loud did the trick for me. I get that now. (which is probably why in all the videos I've seen so far they say talk through your triggers)
On to the OR statement on the first slide. How come that doesn't work?
Sorry, I forgot about the OR statement. It does work when you click the circle, because that's when the vCircle variable changes. You could duplicate this trigger for the other two variables, or scrap them altogether and add a JumptoNext slide to each of the three shapes.
So does the OR statement just not work or am I misunderstanding its use? Maybe I'm trying to be too fancy by combining triggers, but it seems to me that this should work. Even when I say it out loud it sounds logical.
However, both of the above solutions do work and I thank you for that. I was kinda hoping I wouldn't have to always make separate triggers for everything.
BTW, I scrapped the variables(at least using them to get to the next slide) and used a trigger on each shape to get to the next slide.
Hi Rick,
When I opened your .story file attached in the first post - I saw in the trigger panel that it was referencing the "or" condition - but upon opening the trigger to double check it I saw it was using the "and" condition instead. When I updated that to the "or" condition - it worked as expected.
Please make sure that when working on your .story file you're working as described here with local project files.
This discussion is closed. You can start a new discussion or contact Articulate Support.