StoryblockOpen the scene editor

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

Watching before moving on

To make learners watch at least part of a video before they can continue:

  1. 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.
  2. 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.

Checking flags

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:

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.