Variables between Scenes

Sep 04, 2019

I have a variable set to when the user gets to then end of a scene, the 2Complete is increased by one, then on the "root" scene, a button's state is changed to completed.

See below; however, the state on the button is not changing after the variable is being increased by 1.

Any help on this one would be great!

• Used by a shape trigger condition on "Button 1" on "1.1 RPA3556 KIAH-KABQ
Taxi to Runway" in "1 RPA3437 KIAH-KABQ Taxi to Takeoff

Trigger Text: "Change state of Button 1 - "KIAH Taxi" to Completed When the timeline starts If 2Complete is Greater than or equal to 1.00 "

• Used by a slide trigger on "2.6 RPA3556 Taxi Instructions" in "2 Taxi Clearance"

Trigger Text: "Add 1.00 to 2Complete When the timeline starts "

7 Replies
Robert Amey

OK, but I only care about it happening once, then it should return to it's saved state, otherwise it will continually add 1 to the variable, correct? 

This is triggering a button state change on another scene (the first scene), which is the launch scene to get into the scenes containing the +1 variable trigger.

Ren Gomez

Hi Robert,

If you only need the button state to change once, why not utilize a True/False variable with the trigger to Adjust Variable when Variable changes, so it's not dependent on the timeline?

Judy made an excellent suggestion in changing the slide properties to "Reset to Initial State" when revisiting. It shouldn't affect the trigger if more than one gets added since you set the condition to Greater than or equal to 1. 

Can you explain more what you mean in your second sentence? I only see this variable between two slides: the menu and the last slide of the first scene. Looking forward to hearing back!

Robert Amey

"This is triggering a button state change on another scene (the first scene), which is the launch scene to get into the scenes containing the +1 variable trigger."

^^

I will have the user select a button in Scene 1, in the example I provided, which takes them to Scene 2, this then changes the state of the button to "Visited."

However, I do not want the Launch Scene button to be "Completed" until all of the slides are viewed in Scene 2, i.e., the reason to adding a +1 to the variable for scene 2.

After the Menu button is selected on the last slide of Scene 2, the system should be adding the value of 1, therefore changing the state of the button taking them to scene 2 to "Completed," rather than the visited state.

So unfortunately, there will be two states for each button, one for visiting the associated scene, the second for having viewed all of the slides; there is "restricted" navigation between slides.

>>> Variable >>>

• Used by a slide trigger condition on "1.1 RPA3556 KIAH-KABQ
Taxi to Runway" in "1 RPA3437 KIAH-KABQ Taxi to Takeoff"

Trigger Text: "Change state of Button 1 - "KIAH Taxi" to Completed When the timeline starts If 2Complete is Greater than 1.00 "

• Used by a shape trigger on "Button 1" on "2.6 RPA3556 Taxi Instructions" in "2 Taxi Clearance"

Trigger Text: "Add 1.00 to 2Complete When the user clicks " << This is the Menu button on the last slide Scene 2. Originally, I had it set to when the time starts, but thought it might work better on a tactile user-interface.

 

Ren Gomez

Hi Robert,

Thanks for that additional clarifying information! The Visited state has built-in behavior, and I think that's what could be causing issues for your design.

I've set the Main Menu to Reset to Initial state and created a custom Visited state for your button. I've set it so the button will trigger the custom Visited state when the 2Complete variable equals 1, and trigger the Complete state when it's greater than 1.

Take a look and see if this works for you!

Ren Gomez

Hi Robert,

It did! I previewed the entire course, and when the menu came up, I clicked through the Taxi Clearance scene. I jumped back to the menu in the middle of the scene, and I saw that the button was red.

Once I went through all the interactions in the scene and clicked through the last slide, I returned to the Menu to see a green button. Feel free to test out the first scene I've published here.

This discussion is closed. You can start a new discussion or contact Articulate Support.