Variables

Apr 08, 2015

Hi

I have built the following: A course with 5 chapters. Each chapter has a menu slide with buttons that change to the visited state when each topic has been covered. Once all the buttons have been changed to visited, I would like a picture (badge) which is set to hidden to appear as normal on another slide set-up as a lightbox. The learner will get 5 badges at the end of the course. I have created a badge button on the navigation bar, so the learner can click on this anytime during the course to see which badges he has achieved. This slide appears as a lightbox slide. 

I know I need to use variables but my knowledge on variables is very limited to this https://community.articulate.com/series/articulate-storyline-1/articles/working-with-variables

I would appreciate any detailed help on how to customise the variables.

Regards,

Milan

6 Replies
Christophe Jacobs

Hello Milan,

Assumptions:
I do not use the standard navigation, all navigation is done by custom buttons on the screen.
All slides are set to RESET TO INITIAL STATE

Step 0: Make sure all your objects are in place to start adding triggers and variables.

Step 1: Make sure that your topic buttons change state when you have visited a section of content. So create a variable that checks whether you visited a specific section of your course. In the example I call them TopicX_X. These variables are TRUE/FALSE variables since I will use them to check if a user visited a topic. When they do, I set the value to true. We will use these variables later to check if users are allowed to see a badge.

Step 2: On the overview per chapter make sure that the slide is set to 'RESET TO INITIAL STATE' so Storyline is forced to check the value of each variable. If the value changed, then I want the state of my button to change. So I create 2 conditional triggers (since I only have 2 topics per chapter) that perform this action. The condition will be the value of the variable. If the variable is false, the action is not executed to change the state. If the variable is true, I want the button to change its state.

* Addition: If you want, you can use the same variables to change the state of you button on the overview screen that gives you access to each chapter. Only this time you have 2 conditions, Topic1_1 AND Topic1_2 need to be true for the button to change.

Now test it out and see if it works.

Step 3: On to the badges. On this screen our badges are currently in a hidden state. Now we need conditional triggers that change the state. So if a user visited topic 1_1 AND Topic 1_2 they can see badge 1. That is what we are going to create. Now do this also for the other badge.

Et voila. Since you are lightboxing the slide of the badges, each time you open it the timeline will restart. This means that Storyline will check the values of the variables and change the state accordingly.

You can find the example in attachment to explore the project and implement a similar solution to your project.

Christophe Jacobs

Hello Milan,

I looked at your project based on the solution I created for you. Feel free to ignore some feedback if it is not linked to your specific situation.

Now, just a few things I saw in your practice project:

1. Showing the badges

On your badges screen you are using the following set of triggers.

1. BEFORE

I understood from your first explanation of your problem that you earned the three badges independent from each other. So if you completed topic 1, you get badge 1. If you complete topic 3, you get badge 3. If you look at the last trigger you actually say that a user only sees badge 3 is they completed topic 1 AND topic 2 AND topic 3. So I would change it to the following

1. AFTER

 

2. Think about the variables

When working with variables, it is vital to understand that a variable needs you. They need you to be changed. They just can't change themselves. You have correctly created 3 boolean (=True/False) variables and they are all correctly FALSE by DEFAULT. Now think about the following trigger that you have in your project:

Roughly translated, you say to Storyline:

"See the first button on the screen? Well my dear Storyline, could you change the state from blue to grey? But wait, only do it when you check the value of the variable and if that value then is TRUE".

Now comes the most important question. When is the value of the variable ever changed to true? 

Nowhere in the project you changed the variables value. So Storyline performs everything like you asked it to, but because the variable never changes value nothing happens on the screen because Storyline checks this value and it remains to be FALSE.

The solution here is to add a trigger to the last NEXT button of a module (the one that jumps to 1.1). And that trigger should be the following:

ATTENTION! Be sure to first execute the adjustment in the variable and then jump. Otherwise the change is never executed. See my example:

Your changed project can be found in attachment (Storyline 2 file so be sure to download the trial version if you do not have it installed).

Have fun experimenting further with Storyline.

Kind regards,

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