States vs Layers vs Variables in Articulate Storyline 2
One of the questions I get asked a lot in my role as Certified Trainer for Articulate Storyline 2 is when to use States, Layers or Variables. Itâs a common question because these features can â on the surface â appear to do very similar things. In many cases itâs purely a personal choice which one to use, but itâs important to understand that they do have some key differences.
First of all letâs identify each feature:
- A state is the visual appearance of an individual object, based on the users interaction with the eLearning
- A layer is a secondary slide that sits on top of the base slide and is used to reveal more content or hide some content
- A variable is a container that holds information. This information can then be used at any point in the course â either displayed on a slide or held in the background to help control other elements
Laid out, they appear quite different, so why are they easily confused? Well, a state change can include adding to or hiding part of an object or image â showing more or showing less â sound familiar? What about âI want my menu to act as a progress meter as well, why would I need variables? Canât I just use the button states?â To understand when to use a state rather than a layer, or a variable rather than a state, letâs take a look at some of the key the differences and a few functional examples.
States:
The purpose of a state is to change the visual appearance of one object; that may include the addition of something else such as the checkmark in this example,
Figure 1 Object States
but it is most often a relatively small change that is effectively grouping a couple of objects together in a certain circumstance.
Layers:
Layers are designed to show or hide content, and you often find there are several layers each showing different content and you trigger those layers by interacting with several objects on the slide. The classic example of this is the Tabbed Interaction:
Figure 2 Tabbed Interaction
In the case of these layers itâs a significantly larger amount of content that is shown than you usually see in a state change. Remember, the default behaviour of Layers in Articulate Storyline 2 means you see just one layer at a time. This is significant in this case as the content on each tab takes up the same space on the slide, if we placed all this content into a state change for the tabs weâd have to build lots of triggers not only to change the state of the click tab to âvisitedâ but to change the state of all the others back to ânormalâ, otherwise weâd get lots of content overlapping each other and the course would be unreadable, like this:
Figure 3 Overlapped Object states
When it comes to hiding content using layers, the key functionality is being able to Show/Hide Base Layer Objects using the Timeline:
Figure 4 Hiding Base Layer Objects in Layer Timeline
This means we can hide the appropriate objects when viewing each layer, and donât have to build a whole load of triggers to show and hide what could be potentially a lot if objects.
Variables:
Variables are, as we said, containers that hold information that can be used a various places throughout the eLearning. On the surface they donât seem to fit with these other two, they are not specifically about changing appearance or showing/hiding content, but they do remember information and can be displayed on slide or â importantly â be used to control changes to other objects elsewhere in the course.
True/False variables allow you to mark a defined moment/event within a course and remember that it has happened when you reach another point in the course; Numeric variables hold numbers that can be used for calculations or to count up or down; and Text variables hold user inputted data which can be validated against another variable or fixed value.
Going back to the idea mentioned earlier of using a menu/selection slide as a progress meter of sorts within your eLearning, using a change of state to track progress through a course is one option, but it doesnât really tell us how far through the course the learner really is. A button state becomes âvisitedâ as soon as you click it so a learner may only skip to the first slide and back and the button has changed making it seem like theyâve finished a section. Youâd need a custom state to show when a section is not just âvisitedâ but is actually âcompleteâ. And how does Articulate Storyline 2 know when to switch the state from âvisitedâ to âcompleteâ? Well, use a numeric variables to track how far through the section the learner has reached, or a T/F variable to mark when they have reached a predetermined point, and use this information as a condition on your Change of state trigger. Itâs a little extra work but well worth it to give you a much clearer and more accurate progress meter menu.
So there you go: States and Layers can both be used to show you different versions of content; States and Variables can both be used to track where you are, or have been. However the differences between them often come down to scale. Picking the right one for the context is important, and using them in combination gives you great power to build great eLearning in Articulate Storyline 2.