Forum Discussion
Using Variables or States across Scenes
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
- DanMyers1Community Member
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
- SteveBlaneCommunity Member
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.
- GregDamronCommunity Member
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?
- DanMyers1Community Member
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 - GregDamronCommunity Member
Great catch Dan, the order of the triggers can be cricically important! Double checking trigger order is always a great troubleshooting step.
- RachelCrabtr843Community Member
It's amazing the amount of times my "bugs" can be fixed by adjusting the trigger order. Opps!
Rachel,
Sadly I think we've all been there. 😆 Always here for a second set of eyes if needed.
- SteveBlaneCommunity Member
Thanks for looking into this Dan and Greg - I think I am still going to need to spend some time with this. Head spinning a bit, but not completely around now!
- SteveBlaneCommunity Member
@Dan (and everyone) thanks for this. I was completely lost on variables and how to get past 1 slide. Your posts got me there!! Thanks.
- Lucasde-VreugdCommunity Member
Thanks Everyone. Big help!
- JenniferRowl491Community Member
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!
- WendyFarmerSuper Hero
Hi Jennifer
because you are leaving the slide and returning to it change this trigger to WHEN TIMELINE STARTS instead of when variable changes (use the same conditions)
- JenniferRowl491Community Member
That did it! THANK YOU!
- PedroGutierrez-Community Member
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.