Routers
Send each student down the right path — route by score, by variables, by what they answered, or by how many times they've tried.
A router decides where the activity goes next. It is not a scene — students never see it. When the activity reaches a router, the router checks its rules in order and instantly sends the student to the first destination whose rule matches. If no rule matches, the student goes to the router's Otherwise destination, so there is always somewhere to go.
Routers are how you build activities that adapt: send strong students ahead, send struggling students to review, and break students out of a retry loop after a couple of attempts.
Create a router
Routers live on the Activity Storyboard, the map of your activity's flow, where a decision point belongs. Open it with ← Storyboard at the top left of the studio, then:
- Click the scene the branch starts from, press Add what happens next, then choose Something else and Different scenes for different students. This is the quickest way, and the one to reach for. The guided window asks _where_ students go (this choice), _when_ they go (they tap something, they answer correctly, they answer wrong, their score is…, time runs out — exactly the same question as adding a path), and then lets you write the router's rules and Otherwise in the last step, Who goes where?, without leaving the window. Nothing is added until you press Add path. The router arrives already connected to that scene. Its Otherwise starts on wherever the scene sent students before, so the router is never a dead end.
- Add router (at the top of the board) opens a new router's rules; press Add router there to create it on its own, with nothing pointing at it yet, or Cancel to add nothing. Use it when you want to build a shared hub first and wire scenes into it afterwards — until you do, the board lists it as something to check.
- Click the router's card and press Edit rules to edit it: rename it (like "After the quiz"), add rules, and set destinations. You can also drag the round arrow on a router's card to a scene or another router: that adds a rule going there, and asks you when.
- Add rules to it. Each rule is a set of conditions plus a destination. Rules are checked top-to-bottom, and the first matching rule wins — use the arrows to reorder them.
- Read a router at a glance. Rules sit collapsed to a plain-English line of what they check and where they send students — "Cows has been visited and Pigs has been visited → Done" — so the order you'll be reading for is easy to scan. Click a rule to open it and edit its conditions and destination; click its header again to fold it back up. A rule you just added opens ready to edit.
- Set the Otherwise destination — where students go when no rule matches. Every router has one; it can't be removed.
A rule's destination can be a scene or another router, so a diagnostic router can hand off to a per-topic router. (Routers can't form a loop with no scene in between — publishing checks for that.)
Send students to a router
A router only runs when something sends the activity to it. There are three ways:
- From the storyboard: click a scene, press Add what happens next and choose Something else, then Different scenes for different students (above), or choose A scene already in the activity and pick an existing router as the destination (it is listed as Router: <name>, beside your scenes). Either way Berdee writes the wiring for you, so this is the way to reach for.
- Scene progression — in a scene's Progression section, choose the Router mode. When the student gets the scene correct, the router picks where they go instead of a fixed destination.
- A button action — on any widget interaction, choose the Delegate to Router action. Pair it with a Check Answers button for a "check, then route by result" pattern.
More than one scene can point at the same router — that is how a shared "after the quiz" decision serves every quiz scene in the activity.
What rules can check
Rule conditions use the same building blocks as Events, Actions, and Conditions, plus a few made for routing:
- Scores — the current scene, the whole activity, a scoring group, or any specific scene by name ("Scene score: Quiz 2 is failing"). Prefer _is passing / is failing_ over raw percentages: they respect each scene's own passing threshold.
- **Variables** — route on anything you track, like
path equals "fractions"orstars is at least 3. - Widget state — an input's value or whether a widget was answered correctly. Tip: for a number the student typed or an option they picked on another scene, save it to a variable first (Set Variable → Widget property) and route on the variable — variables are the reliable way to carry answers between scenes. Words typed into a text input can't be saved this way yet.
- Visits — whether (or how many times) a student has entered a scene or passed through a router. This is the loop-breaker: "visit count is at least 2" means _this is at least their second time here_.
The pattern to steal: a retry loop that doesn't trap anyone
- Quiz scene → Progression mode Router → "After the quiz".
- Rule 1: Visits: After the quiz — visit count is at least 3 → "See the teacher" scene. _(Checked first, so it wins on the third failure.)_
- Rule 2: Current scene is passing → the next activity section.
- Otherwise → the review scene, which ends with a button back to the quiz.
Strong students pass straight through. Struggling students get the review — but never forever, because rule 1 catches the third arrival and routes them somewhere kinder.
Another pattern: a tip for each skill a student missed
Put one question per skill on its own scene, each with a Check Answers button whose tapped path leads to the next question, so every student sees them all. Send the last Check Answers button to a router with one rule per skill: Scene score: Noun question is failing → the noun tip, Scene score: Verb question is failing → the verb tip, and Otherwise to the ending. A router can read any scene's score, not just the current one's, which is what makes this work. Step-by-step: Send each student to the tip they need.
Another pattern: finish only after exploring every part
Give every part of an explore-in-any-order activity the same Back to the map button, and send each one to one router. Rule 1 checks Visits: Part A has been visited, Visits: Part B has been visited and so on, with All conditions are met, and goes to the ending; Otherwise goes back to the map. A visit counts the moment a student arrives on a scene, so the last part's Back button is the one that opens the ending. Step-by-step: Finish only after students explore every part.
Another pattern: back to the question a student left
Give every question in a reading activity a Read the story again button that goes to the story scene, and send the story's one forward button to a router. Rule 1 checks Visits: Question 2 has been visited and goes to Question 2; Otherwise goes to Question 1. A student only reaches a later question by getting the earlier one right, so the latest question they've visited is the one they were working on. With more questions, add one rule per question with the latest at the top. Step-by-step: Let students go back and reread the story.
Good to know
- Rules are checked against the student's state at the moment they hit the router — one snapshot, top to bottom, first match wins.
- A rule with no conditions always matches, so any rules below it can never win. The publish check warns you about this.
- The storyboard gives every router a card of its own that lists its rules in the order Berdee checks them, plus Otherwise: the fastest way to sanity-check your branching before assigning.
- Deleting a scene that a rule points at blocks publishing until you pick a new destination, so a broken path can never reach students. The storyboard shows the dangling rule as a Broken link so you can find and fix it.
- Deleting a router takes the paths into it with it: buttons and other paths that led to it stop leading anywhere, another router's rules that pointed at it are removed, and an Otherwise that pointed at it moves to the activity's first scene. Check those routers after deleting one.
- Deleting a scene or widget that a rule's _condition_ checks blocks publishing too, not just its destination — a rule that can never be evaluated is just as broken as one that leads nowhere.
- If a rule checks a dropdown's selected value or a spin wheel's last segment, renaming or deleting that option matters: an equals rule blocks publishing (it can never match again), and a does not equal rule gets a warning (it becomes always true, so it stops filtering anything). See Renaming an option a condition points at.