Show layer when numerical variable equals a given number

Jan 23, 2013

Hi there,

Hi there, still learning how variables work but I can't understand what I'm doing wrong here.

I have a jeopardy game and I want a 'congratulations' layer to pop up once the score reaches 500.  I have the scoring variable working fine but I can't get the trigger to work.

The variable for the score is called JeopardyTotal and the layer is 'Congratulations'

My trigger is:

Action:  Show layer

Layer:  'Congratulations'

When:  Variable Changes

Variable: JeopardyTotal

On Condition:

JeopardyTotal>= Greater than or equal to 500.00

Any suggestions on what I might be doing wrong?


7 Replies
Nancy Woinoski

Hi Miriam - without seeing your story file it is going to be hard to determine what is going wrong. This trigger looks fine but how are you incrementing the count? 

One thing to keep in mind is that trigger order is important - (starts from the top of the trigger panel to the bottom). It might be that storyline is evaluating the show layer trigger too soon.

Miriam de Jonge

Thanks Nancy!  At least you've confirmed I'm not misunderstanding how the 'change variable' code works.

My slide has lots of buttons attached to different question banks, with lots of object triggers that interact to change the button states when they've been clicked, prevent them being clicked twice, adding and subtracting from the total variable depending on the answers given.  Over 100 object triggers all working beautifully together.

However there is only one slide trigger - this one to show the congratulations layer once the score hits 500.  I can't move the slide trigger below the object triggers I think?


Annie Jean

Hi Miriam,

The only thing I see that prevents the trigger from working is the "When : Variable changes".

Since Storyline has no "listener" to look at the variables value at all time, you need your trigger to be set to an action.

Depending on how your slide/layers are made, it could be "when : timeline of your slide starts" or "when a button is clicked (like a submit button".

It will probably be the exact same action as the one used to make your "JeopardyTotal" variable change.

Hope it helps and have a nice day!


Garth Yorko

It sounds like the variable changes before the trigger is active.  For example, the variable changes when you answer a question from a question bank, not from the slide with the trigger.  So by the time you return to the main page, it is not registering a variable change.

You might consider a True/False variable.  Initially set it to False.  Create a trigger for the Main page (from which you want the congratulations) that changes the state of Congratulations from hidden to normal when JeopardyTotal=>500.

Miriam de Jonge

Didn't figure it out but came up with another option which works better overall in the course (isn't that often the way?) - now there is button where you can choose when to finish and if your score isn't over 500 you get a warning checking that you really want to finish, and if you are over 500 you get a completion certificate.

So having that interaction creates the opportunity for Storyline to check the score - problem solved.

Thanks peeps!

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