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".
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.