Adding game mechanics to elearning is great way to keep your learners engaged and motivated. However, you don’t necessarily have to learn any new software to create a game-like experience in your elearning! Many game features such as achievements, points and badges can be done right in Storyline with variables.
We have discussed using variables in previous articles on programming elearning before, but what exactly is a variable?
Variables are like a placeholder for a piece of information that the user will eventually populate with a value. The value is a form of information, and that can be used for other functions elsewhere in the elearning. There are three types of variables that determine what kind of information the variable will hold.
True/False: there are only two possible values. This can be used to track Yes/No types of information, i.e.: if the slide has been completed, if an object is selected, etc. This is also useful if the user can toggle between the two states, i.e.: whether the closed captions has been turned on or off.
Text: this variable contains text values. This can be used for things such as name input or other text that can be changed.
Number: this variable contains numerical values. This is a great way to track points, progress, calculations, and other functions.
With these variables, you can program Storyline to customize the username on badges and achievements, tally points, count the number of clicks on a slide, and other functions. These are also very useful in triggers as you can use variables in trigger conditions, such as showing feedback or moving onto the next screen when a variable reaches a certain value.
When you want to display any of these values in the elearning, then create a text box that contains the name of the variable with % signs at either end. For instance, if you have a variable to keep track of the learner’s points called GameScore, you would display this on screen as %GameScore%. This text box will populate with whatever the value of GameScore is and updates as it changes!