Variables don't work the way I want them to

Jan 06, 2014

What I tried to do was get 4 buttons to display layers according to the choices the learner makes. There are four slides with options. The buttons represent the slides. The different states represent  the options that a learner may have made. (In other words, if the learner clicked on Option I (a button) on slide 1, I want Button 1 to display State I.  So I set a trigger for Option 1 to add 1 to Variable 1. Then I set another trigger on my slide with the four buttons to Change state of Button 1 to State 1 when mouse hovers over Button1 IF  Variable 1 == 1. But it didn't work. By the way, I set up triggers and variables in this manner for all the Buttons.

Is it possible to overwork Storyline with varibales such that they don't function?

7 Replies
Simon Perkins

Aaron San said:

 

Is it possible to overwork Storyline with varibales such that they don't function?


You can't overwork SL with variables and have them no function ... unless you encounter a bug.  Some of the people here have built some insanely complex courses/demos that use lots of variables and hundreds of triggers etc.

What you can do is set your triggers up incorrectly - either they're ding the wrong thing or they're firing in the incorrect order.

Unfortunately I haven't got the time right now to figure out exactly what you're trying to do and build a demo, but if you're able to upload this part of your course then I'll take a look later or tomorrow.  

Ashley Terwilliger-Pollard

Hi Aaron,

I'd agree, you really can't have "too many" variables or triggers, and for example I'd point to this one example created by Super Hero Phil, I think it has over 7,000 on one slide alone! 

If you're able to share your .story file with us here that's generally a good starting point to help troubleshoot. In the meantime, you'll also want to check your trigger order, as the execute from top to bottom. So for example if the trigger to adjust the variable is after a jump to slide trigger, the variable may not be adjusted. There are some helpful hints in this tutorial to get you thinking about your set up. 

Nancy Woinoski

Hi Aaron, can you post your project ( or recreate a mini project with just this slide) so that we can take a look at the logic. As Simon and Kimberly said it can be something as simple as the order you are firing the triggers or it could also be a flaw in the logic. There are so many different ways to do things like this in Storyline so the best bet would be to have someone take a look at your setup. 

Steve Flowers

Sounds like you're trying to change the state of an object that already has the object state forced with a built-in. Does this describe what you're trying to do?:

  • When you hover over button 1 you want to change it to state 1 if the value of a variable is 1

The problem may be that you can't override built-in states. When you are hovered over the object, it's going to force it to display as hover. It won't jump over to the other state.  If you add a transparent button over the top of your object, you can control the state of the underlying object by "faking" the hotspot.

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