multipe true/false variables - changing state

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
Pierre Jouan

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...

Wendy Farmer

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.

 

Robert Garriga

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!

Kay Fenton

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.

Christos M.

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:

  • Timeline start.
  • State of a "normal" object on the layer being normal.
  • The state of any one of the menus being "selected".
  • The "somechange" third variable which toggles every time a user clicks on a trigger to display a layer.

Any ideas?

Christos M.

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.