In this tutorial, you will discover how to use the "Enumeration" type of variable.
The Enumeration variable
This type of variable allows you to define a set of items, such as a hand in a card game, ingredients in a recipe, or books in a school bag.
This variable can be very useful if in one of your scenarios, learners have to collect different items. This variable will allow you to check which items have been acquired or not.
Example scenario
The aim of this scenario is to compare the enumeration variable with the items to be found. When all the elements are found, the set will be considered complete. It is then that the consequence can take place in the conditional system. In this example, the consequence is the opening of the lock.
Main steps
- Create and position the elements needed for the tutorial
- Add an enumeration variable
- Define the conditionals that will modify the variable
- Define the consequence of completing the variable
Step 1: Create and position the elements
Let's start by creating and positioning the 4 elements.
Here we use 4 image elements that you can find in the online library of Speedernet Sphere.
Then add another image element. This one has two aspects, an initial aspect (locked) and a secondary aspect (unlocked).
Step 2: Adding and editing the Enumeration variable
To access the variable manager, use the toolbar on the left.
Then add a variable that you can name “Clue” and define its type as "Enumeration".
The next step is to set up the values.
Here the values are: 01, 02, 03 and 04. And no value is active by default (no value is selected).
Step 3: Define the conditionals that will modify the variable
In the scenario mode, create conditionals for the variable “Clue”.
Each click on the objects will add the corresponding value to the variable.
Step 4: Define the consequence of the completion of the variable
When all the clues are added to the variable, it becomes complete. It triggers the consequence: change the aspect of the lock, from closed to open.
To do this, create a new implication as shown in the image below:
Now you can test your scenario!
Don't forget that this tutorial presents one of the use cases of the enumeration variable. You can use this variable for other types of scenarios.
Share with us the scenarios you will use with this type of variable and let us know what you think!
See you soon in the next tutorial!
We also invite you to check out the following tutorials:
Comments
0 comments
Please sign in to leave a comment.