Articulate Storyline Variables – True/False Variables

Articulate Storyline Variables – True/False Variables

21:39 22 November in Articulate Storyline
0 Comments

So I have already talked about number variables and text variables so that only leaves one more kind of variable that I can talk about within Articulate Storyline 1 or 2 and that is True/False variable. If you are at all familiar with any type of programming this would be the same thing as a Boolean variable. Articulate just tries to make it easier to understand by calling it a True/False variable.

Looking at Wikipedia here is the definition of a Boolean (True/False) variable “Boolean data type is a data type, having two values (usually denoted true and false), intended to represent the truth values of logic and Boolean algebra.” So this kind of variable really only stores two different types of variables which are either True or False. 

So why would you need to store true or false? What kind of data would you need to know if something is true or false? This one type of variable is probably your most common variable in programming. You may want to think of it in different ways like right/wrong, visited/not visited, off/on, clicked/not clicked or ready/not ready and many other variants.

You can use the true/false variable as a setting if you want to allow the user to hear sound which means if the variable is true you play the sound but if it is false then you do not play the sound. Or if you want to see if something is clicked on then you can have the variable set to false (not clicked) before the click and then set it to true (clicked) once they click and based on that knowledge you can restrict them from continuing based on visiting certain items on the stage.

Here are some examples of what you can use the True/False variable for:

  • Settings
  • Answered Questions
  • Correct or Incorrect
  • Visited Items
  • Completed Interactions


Step 1: Creating the Variable

Ok so now that we know a little background on it the True/False variable let’s actually put it to use. To create a True/False variable within Articulate Storyline click on the variables button in the triggers area.

Variables

This will pull open your variables for your project. If you are in a new project it will be blank with now variables inside of it. We will need to create the True/False variable here so we can use it in our pages. We are going to do a simple example here and not allow the user to go to page 2 until they have clicked on the rectangle on page 1. I know it is simple but I want to just show the application of it for now so you can focus on how it works. So click on the plus icon to create a new variable

Add

Once the plus icon is pushed you will see a spot to name your variable and select what type of variable it is which in this case should be True/False. You can name the variable whatever you want but let’s go ahead and name it rectangleClicked. I like to keep my variables named in a way that I can see what they are used for. Finally let’s set the default value to False the reason is when the course first loads that rectangle will not be clicked until they click so we will turn it to true once it is clicked but it has to be false to begin with.

Screen Shot 2014-11-16 at 11.24.19 AM

Once I press ok you can see it has now been added to my variables section and I can click ok from there.

Screen Shot 2014-11-16 at 11.25.16 AM

 

At this point I can see all my variables in the course which for now should just be 1. Go ahead and click ok to close out that window and now we can create the page.

Screen Shot 2014-11-16 at 11.25.16 AM

 

Step 2: Creating the Interaction

We are going to create a page that has 1 rectangle on it and some text that says “Click the rectangle before you click next.” We want to prompt the learner how to move forward or else it just leaves them frustrated. So here is my first page win Articulate Storyline.

Rectangle

Now we are going to create a new page that shows some text saying something like “Congrats, you made it to the second page.” I know it’s simple but I am trying to focus on the concept and make it as simple as possible. Here is page 2.

Page_2

Currently of the learner clicks the next button they would be taken to the second page no matter what so we need to add a condition that will only go to the next page if the variable we created is equal to false. On the first page you can double click on the current trigger within the trigger area that is attached to the next button and add a condition to that trigger.

Next_trigger

So by double clicking you will see the options to modify the trigger and a spot to add on conditions. Conditions make it only run of certain conditions are true whether it be a certain #, text or value. So make sure you click on Show Conditions to see where you can add triggers and click on the blue plus icon to add a condition. Keep in mind you can have more than one condition on each trigger.

Show_Conditions

The new condition window will show allowing you to add a condition.

Condition

Now you can have a condition based on a variable, a state of a shape or a window. In this case we want to stick with variables and select the if drop down box and select our variable of rectangleClicked.

Recntagle

Now we need to select the operator which we have 4 choices. Screen Shot 2014-11-22 at 2.23.33 PM

We will talk about conditions in a later post but for now we just need to check to see if the variable rectangleClicked is equal to true. So the rest of the options should be as follows.

Rectnagle

From here go ahead and press ok. If you preview your project you will see that by clicking on the next button it does not go to the next page at all. That is because we never change the rectangleClicked variable to true and the next button will only work if it is true.

So from here we need change the variable to true when the user clicks the rectangle. We can do that by adding a trigger to the rectangle. So here is the trigger we need.

change_var

Here we Adjust Variable of rectangeClicked and change the value of it to True and that happens when the use clicks the rectangle 1. It helps to be able to read out what each step does so you can troubleshoot if needed.

Step 3: Preview and Test

From here we would just preview and see if it works. You will notice the next button does not work if we do not click the rectangle first.

 

Be Sociable, Share!
No Comments

Post A Comment