Variables
Apr 30, 2013
I'm having some difficulty getting a state to change based upon a variable condition being reached.
Here is what I am trying to do. On a menu slide their are 5 buttons each representing a module. When clicked that module is started. I want the button state to change when the module is complete, invoked when the learner clicks <NEXT> in each modules last screen.
I have configured this they way I think it should work, but it is not working.
This is my variable definition on the last slide:
Here is the state change trigger in the home page with the menu buttons.
If there is any insight out there, I'd be happy to receive it.
Thanks
Stanton
12 Replies
Hi Shanton,
Real quick guess - is your main slide resetting to its initial state? Try changing your revisiting settings to "Resume Saved State", if you haven't already. This should retain the state and carry it through when the user lands back on the main slide.
If that doesn't work, can you share the .STORY file, or a single section of the course in a .STORY file? I'd be happy to take a look and see if I can give some additional suggestions.
Thanks!
Hi christine,Yeah, I had a thought it might be the slide properties. The problem with changing that is that the buttons states that I have programmed need to be reset to initial state so that the colour states change that I have created work - you'll see. Is this an either/or situation where I cannot do both the button menu feature I designed and the Done variable.
Nice catch, Jesse.
I was just about to say, it may also help to change that to: When: "Timeline Starts", as well.
Hopefully one of these suggestions will work for Shanton! :D
Hi Stanton,
It'll only shift the state of your object at the exact moment that the variable changes value. This means if the variable changed value on another slide, your trigger is sitting and waiting and won't change your state. To make it work, try changing the When: to "When Timeline Starts". This way, it'll fire the trigger and check the condition. If the condition is true, it should shift the state of your object.
This is the correct screenshot...sorry for the wrong one. I deleted it
Christine beat me to it
I call the When Variable Changes event a "listener" since it's sitting and listening for the moment the variable changes. The event doesn't care what it changes to but it won't fire unless the variable does change.
Hi Jesse, I'm not sure I see where your design is different (other than the label/variable names). could you point out what you changed?
Thanks
Stanton
It's the when part...it's set to "Timeline starts" instead of "Variable Changes." I accidentally uploaded the wrong screenshot a couple minutes ago. I deleted it and put up the other one. Hopefully you see the correct one and not the one I botched
Thanks for your help with this folks. I think we are getting closer.
I can see the state change nicely, except now it seems to be ignoring the conditions and changing the state to "completed" on the first pass through the slide, rather than after NEXT is clicked on the last slide in the module. Any other ideas?
Thanks again
Stanton
Something I thought might work would be to change the condition of the variable to False earlier in the slide sequence. That seems to fix the premature state change, but it does not appear to change to state to completed. This makes me think that the issue might be with the initial "when NEXT clicked" trigger at the end of the module.
Here is the latest version of my storyline with your suggested changes.
Yeh. I figured it out. Thanks to David Anderson who shares this tutorial https://player.vimeo.com/video/149072114
The issue (likely in addition to the ones you pointed out) was that the order of triggers in the last slide. The jump back to home was occurring before the variable value setting.
Thanks again for your help folks.
Stanton
This discussion is closed. You can start a new discussion or contact Articulate Support.