Variables

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
Christine Hendrickson

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!

stanton mackellar

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.

Steve Flowers

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.

stanton mackellar

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

stanton mackellar

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.

stanton mackellar

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