multipe true/false variables - changing state
Oct 15, 2015
Hey everyone,
I try to use my first variables.
I have a base layer and two slide layers. There are two true/false variables, each for one slide layer. So I want the learner to click on both buttons on the base layer, to see the content of the slide layers. If they go back to the base layer the variables change to true. That works fine. So I get to the point where both variables are "true" on the base layer. Now I want to change the state of another object on the base layer, if both variables are "true". For that I created a trigger, but unfortunately it doesn't work. If I set a trigger to change the state of the objekt with the condition that only one variable is true, it works.
Maybe someone understood my problem and can help?:)
24 Replies
Hi Patricia
check the setup of both variables that they are initially set as default 'false'.
Thanks Wendy. Both are initially set as default "false".
I rebuilt the slide to show my problem, but in that version it works ;) So hope I can fix it by my own.
Hi Patricia,
I think your problem is the "Wenn" trigger. It cannot be at Timeline Start because the base layer timeline won't restart and thus won't check variables.
You have to trigger the checking of both variables whenever one of them changes and I think the only way is a third variable (called "someChange") that will change (toggle) whenever you click on a button.
Hope this makes sense...
Hi Patricia
you can also trigger the variables to change on the layer, so when the learner clicks the close button, or when the timeline starts on the layer - change the variable to true. Do this for both variables on their respective layers.
Then you can put a trigger on both layers to change the state of the rectangle on the base slide to selected when the user clicks the close button on the layer if variable x = true and variable y = true. Do this for both layers. So it will only trigger the rectangle to selected when both layers have been visited.
Thanks. It works now. I just had to change the order auf the triggers on one slide layer.
Glad you got it sorted out Patricia
You indirectly helped me solve my problem. Thanks!
In my project, as you complete a set of tasks the items in the summary page change state to track your progress and mark the ones already done. When I revisited the page my objects didn't change state but everything seemed to be right.
How did I solve the issue?
I clicked the Base-Layer Properties. Then, selected "Reset to initial state" when revisiting. Now the timeline restarts everytime I re-visit the page. Variables are now checked and if they meet the conditions they change state.
It was a Timeline Start issue!
You're welcome Robert.
Thanks for the details you give.
Thanks for sharing Robert :)
I have a similar problem with states not changing when a variable is set to True. If a learner selects the checkbox on a layer, a variable is set to True (different variable for each layer). On the "results" layer, if a particular variable is True I want to change the state of a circle to "Normal". The initial state of the circle is Hidden. I know the variable is working as I have added a text box to show this, but the states are not changing. Not sure where I am going wrong.
Have a look at the attached and see if that's what you want. I changed the triggers on the reults layer to When timeline starts.
Thanks Michael for such a quick response. That makes sense now that I have seen it - didn't think of attaching the trigger to the timeline start, but knew I was missing something. Your help much appreciated.
Hi Kay
I've only had a quick look but try changing your triggers on the result slide to when timeline starts instead of when variable changes
Thanks Wendy, Michael suggested that as well and it has worked perfectly. Its always the little things that trip you up but wonderful to have such a great community we can get support from.
Sorry Kay - a bad habit of mine not refreshing before I post - glad you're all sorted.
Hi all,
This does not work for me.
I have 11 layers, which the learner must visit, before the "next" marker can become visible (normal) from hidden. To each layer, I have attached a variable which changes to "true" once the layer has been visited.
There is also an overall variable which should only be true when all other variables are true.
Whereas each one of the 11 variables changes to "true" and stays that way, try as I may, I cannot make the overall variable to agree.
I have tried the following as triggers:
Any ideas?
Please ignore previous post!
I was able to resolve the issue, by setting the SomeChange variable to toggle as each layer's timeline started (as opposed to changing when the user clicked on the layer trigger text).
The issue I am facing now is that when my overall variable successfully changes, the marker does not shift to Normal status (does not become visible) in spite of a clear trigger.
Hello Christos - My first thought would be the 'when', but looks like you mentioned above trying the timeline start setting.
Do you have a .story file that someone could take a look at? That would be helpful. Just let us know the slide in question.
Hi Leslie,
Thanks for reacting so fast!
Please see the story file attached with just the slide that is giving me a hard time.
I do suspect the issue is somehow related to timing, but I need some help to pin it down.
Hi Christos,
For some reason, it works if I make a custom state Empty to the Next button and put it as default instead of Invisible.
I deleted button from Empty state so that it actually is empty!
Thanks Pierre! And how peculiar. A possible bug?
Definitely!
In fact, you have to set Hidden by default using States editor and NOT by a trigger otherwise they won't reappear!
So, forget what I said and just hide your next button using menus!
Thanks, Pierre. I also found this worked by putting the marker into a new layer and triggering the layer's appearance.
Clever!
This discussion is closed. You can start a new discussion or contact Articulate Support.