Quick Links
Video Overview
https://vimeo.com/513861875For full screen please view on Vimeo at this link
About Variables
Variables are an important and powerful component in the Storyflow authoring system. Variables allow you to store values to be used later and to change things dynamically as the scenario unfolds.
Variables may be used in two different ways:
They can give the author precise control over tracking and monitoring progress and remembering decisions and actions.
They can be used with dynamic content to serve up to have a scenario that adapts to unique conditions in a learner's experience.
Variable Menu Location
When viewing a script, you will find the Variables area to the right of the script editor:
When you choose "+ Add New" you are presented with a list of Settings.
Variable Settings
Script Variables
isOutput: It lets a Script send a value back into the Script that called it. If you add an output variable to Script A then use a Script Launcher that launches Script A from Script B you'll see the outputs added to the bottom of the launcher.
isGlobal: By checking this option, you are able to use this variable in any other script in your project. The next time you return to the Variables menu, you will see your Global Variable available to be chosen.
isInput: When you make a variable an input, you automatically create a template script that accepts a value for this variable as an input. A template script is a reusable script that accepts inputs.
Value Definition
Primitive - NOT SET: type of primitive variable is not yet defined
Primitive - Boolean: a variable that has two values, true or false
Primitive - String: a variable whose value is a word (or "string" of characters)
Primitive - Date & Time: a variable whose value is formatted and recognized as a day and time
Primitive - Time Span: a variable whose value is a length of time (eg: 2 hours, 3 minutes and 14 seconds)
Primitive - Number (Float): a variable whose value is any real number (can include decimals).
Primitive - Number (Int): a variable whose value is an integer (positive, negative, and 0 included). Integers are whole numbers (no decimals allowed).
Enum: Used to create a variable that has a list of options or states.
Creating a Variable
An example of a variable would be a checklist that the learner sees and as they complete tasks in the scenario, the items are checked as complete. We have a full walkthrough tutorial on creating this type of content here.
Dynamic Variables
Dynamic variables generally represent fields in resources. Their values can be changed during the scenario based on learner input and other events while the scenario is running. The value of a dynamic variable can be set and reset throughout the scenario and can change what the learner sees and hears and how the scenario plays out. An example of a dynamic variable would be a speaker in the scene and the learner has the ability to adjust the music to be louder or softer.
Dynamic Variables Editing Screen
Within a script, there is a Dynamic Variable editing screen. Click on the atom icon to toggle to this area:
Creating Dynamic Variables
We have a full walkthrough tutorial on creating this type of content here.