Using Variables or States across Scenes

Jun 20, 2012

Here is my situation:

I have built a course that has one "home" screen  - an office.  Learners click part of the office (the phone for example) and are taken to another scene.  There they answer 8 questions and then return to the office.  There are 4 clickable things in the office.  18 questions in total.

Here is my request:

I want to be able to track that the questions have been completed.  For example, when all 8 questions in the phone scene have changed, I want that phone to grey out.  Then when all questions have been answered I want to have the exit button on the door become visible (this last part I've got).

So my question is how do you change states based on variable in other scenes/slides?  Or can you?

Thanks,

Steve

20 Replies
Dan Myers

I'm having the same issue. I'm able to change states based on variables if they are modified on different layers all within the same slide. However, the same triggers to change states aren't working if the variable is modified on a different screen.

I'm making it work by having a screen with 9 layers but it seems like there should be a more elegant solution.

Dan

Steve Blane

Hi Dan,

I am trying to see if this SCREENR will help me - but can't get into it right now.  And, to be honest, I am having difficulty wrapping my head around the equations right now (lack of sleep).

http://community.articulate.com/forums/p/12396/74588.aspx#74588

I am also looking at how I might use the office screen as a results slide.

Greg Damron

Normal 0 false false false oNotPromoteQF /> EN-US X-NONE X-NONE ontGrowAutofit /> ontFlipMirrorIndents />

Hello -One of the main benefits of using variables is that they do hold values between slides. Here's a link that may help:

http://community.articulate.com/tutorials/products/working-with-variables.aspx

If you have it set up to where the variables are capturing the correct information, but your triggers still aren't working, perhaps there may be something on one of your slide loads causing a reset the values? If you can post an example file to show what's going on that may be of great help.

I believe Phil Mayor has done a nice variable demo but do not have that link, perhaps someone could help?

Dan Myers

Hi Steve,

Well, I think I've found the issue. My guess is you were doing the same thing I was and it's a bug that should probably be addressed.

At the end of my branch, I have a button that you click to take you back to the main menu and updates my variables. Those variables are then supposed to trigger a change state on my main menu items.

What was happeing for me is that the first trigger would jump to the slide, but the modifications to my variables wouldn't complete.

To fix it, all I had to do was move my jump to slide trigger to the bottom shown below to ensure that my variable adjustments would execute.

Hope that helps,
Dan

Jennifer Rowlands

I'm running into the same issue and cannot fix it. My scenario takes the learner through three separate scenes. Scene 1 has a description of the problem. The user is taken to Scene 2 where they walk through a series of slides simulating conversation with a client. At the end of the scenario, depending on the path the user chose, Variable X changes to 'gold', 'silver', or 'bronze'. The user continues to Scene 3 where they review what they learned. After the review, the user returns to Scene 1 where the description state should change to an image of a gold, silver, or bronze trophy based on the variable. Hopefully that makes sense. On the slide in Scene 2 that changes the variable, I have made sure that the Change Variable trigger comes before the Jump to Scene trigger. I've also tried changing the Scene 1 slide to return to either initial or saved state, but neither made a difference. I did add the %variable% text on the Scene 1 slide. It does show the change in variable value, but the state of the object still did not change. Can anyone help? I've attached a screenshot of Scenes 1 and 2 (not 3 because there are no triggers there that relate to this). Thanks in advance!

Pedro Gutierrez

Hello, I have a similar but not quite the same type of issue that I'm hoping someone can help me with: my T/F variable is losing it's value between scenes.

I want Slide 2.1 to display state "CA" when the timeline begins on the slide if variable 
"OneRole" is equal to "True". I also want the layer "Role" on that same slide to change the state of text on that layer to "CA" if variable "OneRole" is equal to "True".

The variable is set on slide 1.2 by clicking the role's respective button. However, the variables seem to lose their value between scenes. Can somebody review the attached file and help me troubleshoot?

Thanks in advance.

Walt Hamilton

It's not losing its value; the value is not being changed. There is some sort of corruption with the trigger(s). I don't know which one is the problem, but when I deleted the two triggers associated with the CABtn on slide 1.2, and recreated them, they worked.

For trouble-shooting purposes, I disabled the jump trigger on the CABtn, and added a jump trigger to the FWEBtn. That way, when I clicked on CABtn, I could see that the variable changed, and when I clicked on FWEBtn, the jump was successful.

Pedro Gutierrez
Walt Hamilton

It's not losing its value; the value is not being changed. There is some sort of corruption with the trigger(s). I don't know which one is the problem, but when I deleted the two triggers associated with the CABtn on slide 1.2, and recreated them, they worked.

For trouble-shooting purposes, I disabled the jump trigger on the CABtn, and added a jump trigger to the FWEBtn. That way, when I clicked on CABtn, I could see that the variable changed, and when I clicked on FWEBtn, the jump was successful.

Thank you, Walt! Deleting and recreating the triggers did the trick.