Flags and branching
Flags remember a learner's choices so later elements and scenes can depend on them: the basis of branching.
What a flag is
A flag is a name, like chose-escalate, that is either set or not set. Flags belong to the whole block, start unset, and are saved with the learner's place, so a learner who comes back finds them as they left them. Names use letters, numbers, - and _.
Setting and clearing
- A button's Also setting sets or clears a flag before its action. A choice button can set a flag and Finish the scene in one click.
- An element's When it appears setting sets or clears a flag as the element appears, for example "has seen the policy".
- A video, audio or embed layer's When it has been played setting sets or clears a flag once a share of it has been played, 50% unless you change it. See Watching before moving on.
Watching before moving on
To make learners watch at least part of a video before they can continue:
- On the video layer, under When it has been played, choose Set a flag, pick or type a flag (for example
watched-video), and set After to the share that counts, such as 50% played. - On the Next button's element, set Appears to When a flag is set and pick the same flag.
The button appears as soon as enough has been played. The Watch to continue template (Content layouts) is set up this way with a YouTube video.
- Only what has actually been played counts, and each part counts once. Skipping ahead to the end, or replaying the same minute, does not add up to 50%.
- It works for uploaded and library videos and audio, links to
.mp4and other files, and YouTube and Vimeo links. On an Embed layer it works when the embed is a YouTube or Vimeo address; other embeds do not say how much has been played, and the warnings list says so. - Flags are remembered with the learner's place, so a learner who comes back does not have to watch again.
Checking flags
- An element can appear When a flag is set (straight away if it is already set, or as soon as it becomes set), or Only if a flag is not set (checked when the scene opens). See Appears.
- A scene can be shown only when a flag is set or only when it is not set.
Gated scenes
Finish the scene skips any scene whose flag rule is not met and goes to the next one that is. Go to a scene always opens the scene you chose. "Complete when the last scene has fully appeared" means the last scene this learner can reach.
A common pattern: a choice scene sets or clears a flag, then two scenes follow, one shown only when it is set and one only when it is not, then a shared debrief. The Decision with flags template (Scenarios) is built exactly like this.
The Flags dialog
Flags in the top bar lists every flag:
- Rename a flag by editing its name; every rule and action that uses it follows.
- never set means nothing sets it, so it is always unset. never used means nothing checks it.
- Each flag lists where it is set, cleared and checked.
- Delete removes the flag and every rule or action that uses it (those elements go back to appearing on their timeline).
- Add flag adds a new name. You can also type a new name wherever a flag is chosen.
Trying each branch
Play scene opens the real player with an editor bar. Its Flags group lists every flag: tick one and the scene replays with it set. The scene picker marks gated scenes, for example "[if escalated]". The same bar appears in Mighty Studio.
The warning badge lists flags nothing sets or checks, and scenes no button leads to.