Changing States based on Variables

Dec 05, 2012

Hello everyone

I am new to Storyline and am a little stuck!  I have created a course with several scenes, the first one contains a contents slide with buttons.  I am trying to get the states on those buttons to change based on whether the learner has successfully completed the quiz on each scene/section:

I have added triggers to the contents page to change the state of say Button 1 if Results = pass but I can't get it to work and wonder if it is possible to get those states to change in this way.  Basically I only want the learner to be able to proceed to scene 2 if they have successfully completed scene 1, so I only want those buttons to become active if this is the case.

Can anyone give me ideas on what I am doing wrong?

Thanks in advance!

28 Replies
Steve Flowers

Hi, Jo!

What does your trigger look like? The one that changes the state indicated above. More specifically, what event are you using (When the user clicks, when the timeline starts, etc..)

Whenever I see something like this not working, it usually ends up being the event. If it's set to "When the user clicks" the slide is waiting for that condition and most of the time, it never happens When the timeline starts isn't dependent on user action:)

Rebecca Fleisch Cordeiro

Well, this is weird. I used the Results.ScorePercent variable and it wasn't working for me either, i.e., changing a predesiigned SL button to normal (initially set to disabled) and I tried a couple variations to see if it was something specific.

First, I added a text box with a  reference to the Results.ScorePercent to see if it IS actually recording properly when the Menu slide is revisited.

Check

What if the button is initially set to hidden.

Nope

What if a try a different object

So, I inserted an illustrated character with a confused expression and set her state to change to happy when the timeline starts if the Results.ScorePercent is equal to or greater than 80. And guess what, that works. But the SL button remains hidden, even though it has the SAME trigger and condition set.

Going back to create my "own" button from a shape and test it out. Back in a few

Rebecca Fleisch Cordeiro

Well, yes, it does work BUT I also discovered (she says sheepishly) that I did confuse SL a bit and now they're both working.

It seems that on the Trigger for the SL button I'd incorrectly identified the Object drop-down in the Trigger Wizard and had it set to the BUTTON instead of to the slide.

So, my slide's name is 1.1.1.1puzzled and my Button's name is Button 1 to Scene 2.

When the trigger wizard looked like this

Action Change state of

On Object: Button 1 To scene 2

To state: Normal

When: Timeline starts

On Object: Button 1 to Scene 1

NADA

But when I set the trigger wizard (ahem) correctly to this

Action Change state of

On Object: Button 1 To scene 2

To state: Normal

When: Timeline starts

On Object: 1.1.1.1 puzzled

Working as designed!

That last object drop-down has tripped me up before. Maybe I'll look there first after embarrassing myself!

Could that be what you did, Jo?

Jo Hill

Thanks guys!  Still not working though ;-(

Steve, I did what you suggested and no good I'm afraid. Rebecca, I'd love to upload it but its a huge course as it's mainly video scenes. Bill, thanks but I'm not sure where or how to apply your suggestion! I'm probably doing something daft and missing something obvious. This is what I currently have on my Menu page Triggers:

 I'm scoring 100% on the Main (1st) scene so the URLs button state should switch to Normal (the initial state for URLs is disabled).  I think perhaps I was trying to be too clever with my pilot course! Perhaps I should have kept it simple and just put the quizzing at the end of the entire course, rather than at the end of each scene.  I guess I could try that to strip it down, then perhaps I can get the states to work just based on the scenes being visited without the complication of the results slide variables...

Joe Deegan

Hi Jo,

This may not be the problem but I have run into difficulties like this before and the solution has ended up being the "When Revisiting" option that you can see from "Story View" in the lower right corner.  I think you'll need to make sure that the "When Revisiting" option is set to "Automatically Decide" to achieve what you are going for.  Variables and triggers can get complicated so hopefully this at least helps you narrow things down.

Michael Rosenberger

Joe Deegan said:

Hi Jo,

This may not be the problem but I have run into difficulties like this before and the solution has ended up being the "When Revisiting" option that you can see from "Story View" in the lower right corner.  I think you'll need to make sure that the "When Revisiting" option is set to "Automatically Decide" to achieve what you are going for.  Variables and triggers can get complicated so hopefully this at least helps you narrow things down.

I have had several similar issue using triggers with "When Timeline Starts". Even in cases when the timeline was first loading, and especially when returning to a page. It seems that sometimes when a page loads the variables are not checked as you would think. Maybe I am wrong, but creating triggers that don't relay on timeline start/end seems to have helped me.Good luck.
Annie Jean

Jo Hill said:

Thanks guys!  Still not working though ;-(

Bill, thanks but I'm not sure where or how to apply your suggestion! I'm probably doing something daft and missing something obvious. This is what I currently have on my Menu page Triggers:

Hi Jo,

To check the value of your variable as Bill and Phil suggest, just add a text box to your slides and insert the name of the variable surrounded by % like this - %results.scorePercent% - if the value of your variable changes, you will see it immediately. You can copy/paste this text box on all of your questions slides and to the results slide also.

Hope it helps and have a nice day!

Annie

Jo Hill

Thank you all so much for your assistance and support so far.  I'm afraid I'm a little slow as I'm so new to this, but I have just done the variable test and the result was 0 - so now I'm even more confused!  That would explain why the state is not budging though hey!  I'm confused because the first scene's results slide is referenced as '5.28 results slide' and when doing the quiz it states I pass with 100%, but the test shows zero. 

I will work through all your suggestions and see how I get on, but what I have noticed is that when I moved scenes around and re-ordered them they didn't automatically renumber if you see what I mean and I found that a bit tricky as they then appear to not be in a logical order. I'm wondered that even though I'm picking results slide 5 it may actually be a different slide, if that make sense...

Thanks again for your samples, they are really helpful and I'm quite overwhelmed with the help you've offered and time you've given me so far. 

I will try to upload a reduced version of my course too for those of you who would like to see for yourselves what a mess I've got myself into!!

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