Sliders and Adjusting Fill States
Feb 28, 2024
By
Josh Watson
Help! In this activity I want the audience to slide the, well, sliders as responses to "fill" the coffee cup on the right (hidden shape with various states). I'm able to get the sliders to fill in single increments independently and collectively fill the shape. However if I pull back on the slider (example: move the first one from 4-5 to 0-1) then it continues to fill. What I need it to do is adjust the states based on the amounts--so slide to a lower level and it subtracts from the fill state while still being able to fill if slid forward again.
Hope that makes sense! All help greatly appreciated.
9 Replies
My response to this post might give you guidance: Get multiple sliders to interact with each other / Triggers running in succession - Articulate Storyline Discussions - E-Learning Heroes
Thank you, Judy! I did see your reply there in my search and it definitely helped a bit, but I’m still struggling with how to translate the concept to a full state. Maybe I’m overthinking it, but the toggling didn’t seem to allow for fill state changes by increments
Let me try to clarify.
Moving any of your sliders should toggle a T/F variable.
The triggers that change your coffee cup to the appropriate state would run whenever that toggling variable changes.
In other words, the value of the T/F variable doesn't matter. It just lets the program know that a slider moved, which means the state of the cup has to be changed based on the new set of slider values.
If you did it like my example, you would use multiple triggers for changing the state of the cup: one for each possible combination of slider values. (In my demo, the triggers were showing different layers. But the same idea works for showing different states.)
Change the state of [the cup] to [this state]
When the [Toggle variable] changes
If [classes variable] = [this value]
and [hours variable] = [this value]
and [responsibility variable] = [this value]
Obviously, you need to plan in advance how each combination will "fill" the cup. Refer to that when you're working on the triggers. Having meaningful names for objects, states, and variables will help.
Alternately, you could this:
That is very helpful. Thank you! I will try this tonight.
FYI: You replied while I was updating my previous comment with an alternate programming strategy. So it's a bit different than before -- with an easier method that might work for you. 😄
I vote for the alternate method, and here’s a tip that Judy and I both use to create fewer triggers. Place all the triggers she listed on a layer, and set their “When” clause to “When timeline starts on this layer”. put nothing on the layer, set it NOT to hide other layers, set its timeline to .1 sec, and set it to hide itself when its timeline ends. That way, every time you show it, it runs the triggers and shuts down. On the base slide, show the layer when [classes] changes, when [hours] changes, and when [responsibilities] changes.
As usual, Walt's advice is golden. 🏆
Yes, the alternate method is better for the how-much-coffee situation.
And, yes, using an invisible layer is a great idea. (I even posted about their power: https://community.articulate.com/discussions/articulate-storyline/tip-the-incredible-power-of-invisible-layers).
Thank you both for your time and patience here. Judy: Could you clarify a bit more about this build process? If you can't tell yet, I'm extremely green and learning as I go. I've done a number of searches this morning and I'm having a hard time visualizing this set up.
The alternate method assumes that the sum of your slider values directly relates to the height of the fill in the cup (shown in different states).
The attached file demonstrates the programming, based on my understanding of what you want to do.
A final trigger closes the layer when the layer's timeline ends. (The timeline is very short.)
The demo slide includes text boxes that show the value of each variable. You wouldn't need (or probably even want) to show those to the users. However, it helps with troubleshooting to see variable values, so you can check whether they change as expected.
If the user doesn't need to see variable references, I recommend hiding them or moving them off the slide before publishing. That keeps them available for future troubleshooting.
FYI: It’s worth the effort to learn about variables and trigger conditions, because they provide the real power in Storyline. Here’s the User Guide info: