Variable behaviour on slides, lightboxes, and layers

Jun 23, 2016

I am always running into trouble when I have a certain amount of objects on a slide and I want the Prev/Next buttons to be initially hidden and then appear when all of the target objects are visited.

The behaviour of the variables seems to change whether the objects take the learner to another slide, a layer, or a lightbox (which doesn't seem to work at all).

I do the usual of setting each variable to true on the target layer/slide/lightbox - and sometimes it works initially, but when I go back and revisit the slide, the Pre/Next are no longer there (unless I set it to reset to intial state, which I don't always want to do).

Could someone please explain the different behaviours I can expect from variables when working with layers, slides and lightboxes? It just seems so random.

Thank you!

16 Replies
Michael Hinze

There is no difference in how variables work in slides, layers or lightboxes. However, depending on your trigger order, trigger setup and conditions you may see very different (and sometimes unexpected) results. For example, the 'When Variable changes' option in a trigger is limited to the slide where the change actually happens. Or a trigger "Add 1 to variable xyz when the timeline starts" may only work once, depending on your slide properties (Resume saved state vs. reset to initial state). If you have a specific problem, you can always share your .story file here and someone will have a closer look.

Ashley Terwilliger-Pollard

Hi Victoria,

Variables certainly can have a learning curve and they were not easy for me to grasp at the start either. It's dependent on all the other items that could also be on your slide and within the timeline, so it's not a cut and dry answer of "A variable will always behave this way..." 

The thing I try to keep in mind with variables and triggers is it's all based on logic - you want X to happen when Y has happened or it's equal to Z. We're here to help - so if you want to upload it here in the forums staff and/or the community will be able to take a look. 

Here are also a couple forum threads with some good descriptions of behaviors and circumstances that may help explain things for you:

Victoria Sublette

Thank you, Ashley; the tutorials are very helpful.

My most nagging problem is "change the (hidden) state of the next button to normal when X, Y, and Z are visited". It works the first time, but then when I go to the next slide and then click back, the previous and next buttons are gone and I cannot get them to come up again.

It will work if I reset the slide to the initial state, but then the learner has to go through the introduction again for that slide every time they land on it. :-(

Ashley Terwilliger-Pollard

Hi Victoria,

That sounds really similar to an open bug with our QA team, which I may be having a moment of deja vu - but perhaps we discussed before? I couldn't find that forum thread - but did find this one where I shared some examples and so did Wendy with another user to get around this behavior. 

Based on your triggers you're using states, and my suggestion in that other thread was to also adjust a variable to help control the state of the next button on a revisit to the slide while still using the "resume saved state" properties for the slide. 

Walt Hamilton
Victoria Sublette

change the (hidden) state of the next button to normal when X, Y, and Z are visited".

 

If you are depending on an object being in the visited state, then you have just found a hard and fast rule: Visited state is reliable if you visit layers; not very reliable visiting other slides. Variables never change unless you write a trigger to change them.

I understand your frustration with having to upload examples all the time, but there is a reason. Without your sample, I can tell you how to do it correctly (and I may even upload a sample that works), all of which will be of limited use to you. If they can see your work, somebody here usually can tell you WHY what you have didn't work, which will sure save you a lot of trouble next time.

Mr C

Hi Victoria

This is how I have resolved this issue with my

  • Create a new True/False variable with default as false
  • Create a trigger to disable the next button when the variable is false
  • Create a trigger to change the variable to true when the items (x, y & z) are visited 
  • Create a trigger to change the next button to normal when the variable is true

Example is attached

Hope this helps

 

Ashley Terwilliger-Pollard

Hi all,

Thanks for your patience as we investigate the issue associated with the next button not being normal/accessible on a revisit to a slide where you had initially set it to hidden at the start of the slide.  It’s been determined that this behavior is as expected based on what the triggers are telling Storyline, although it may not match what you wanted to occur.

Since the previous/next buttons are set to be hidden at the start of the slide via triggers, when returning to the slide the command given to Storyline is to hide the buttons as soon as the slide starts. The slide is resuming the saved state of the previous/next buttons as expected, but then the triggers tell Storyline to hide them as soon as the slide loads.

This is where applying the conditions to those initial triggers will come into play - as you’ll want to adjust the next/previous buttons to “hidden” only if the user has not visited this slide before. You’ll see this set up in the file I attached that has that trigger/condition set up associated with the state change of the next player button.

Please let us know if you have any other questions!

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