Skip to content

For Each Actor

Group
Flow
In the node menu
Flow › Loops › For Each Actor
Where it can be used
Scheme graphs
Presets
  • For Each Accomplice

A For Each Actor takes a group of actors and runs the nodes linked to Each once for every one of them. The turns run one after the other.

Inside a turn, that actor is the Current Actor. Each One Is gives the actor a name, so a loop inside this loop can still reach it. When the last turn has ended, Done runs.

A For Each Actor of the demo scheme Scheme 8: Quiet Ending (Drafts/schemes/08-quiet-ending.json), going over the accomplices.

Use it when every actor of a group should get the same treatment, one at a time: each accomplice gets a memory, each guest a reaction.

Use a Repeater instead when the rounds do not depend on an actor, and For Each Clan when the group is made of clans.

  • The list is fixed when the node starts. Actors who die later still get their turn. Destroyed ones are skipped.
  • A turn starts when every flow of the previous one has ended. Flows after a Run In Background do not hold it.
  • Every flow of a turn keeps its own actor under the Each One Is name, also a flow that runs in the background and outlives the turn. The scheme’s variable holds the latest turn’s actor.
  • With nothing linked to Each, the card warns.
  • A Break Loop ends the loop and runs Done. Done runs outside the loop, with no Current Actor.
  • If the group cannot be found, or the node runs outside a scheme, the flow stops there.
  • A preset, For Each Accomplice, sets the group to the accomplices.
LabelDraft keyTypeDefaultShown if, tooltip and notes
FromFromamongnot in the data
WhereWhererows of ConditionDatanot in the data
OrderOrder
  • AsListed (As listed)
  • OldestFirst (Oldest first)
  • YoungestFirst (Youngest first)
  • Random
"AsListed"The order the actors get their turn in. As listed: the order of the group.
If TiedIfTied
  • Listed (The one listed first)
  • Random (At random)
  • Oldest (The oldest)
  • Youngest (The youngest)
  • HighestRank (The highest court role)
  • LowestRank (The lowest court role)
not in the data

Shown if there can be a tie

What decides the order of actors of the same age.
At mostLimitinteger0The most actors that get a turn. No limit: everyone.
  • min 0
  • 0: "No limit"
Each One IsStoreInStore In (Actor)not in the dataA scheme Actor variable that names the actor of each turn, so the nodes of the loop (and of a loop inside it) can pick it by name. Each turn keeps its own actor under that name, even in flows that run in the background. The scheme's variable holds the latest turn's actor. Without a name, the nodes of the loop use Current Actor.
  • none: "No name (Current Actor)"
  1. Each
  2. Done
"type"
"For Each Actor"
Presets (also a "type")
  • "For Each Accomplice": sets From.Pool=List
"set" keys
From, Where, Order, IfTied, Limit, StoreIn
"then" keys
"Each", "Done"
"<alias>": {
"type": "For Each Actor",
"then": { "Each": "<alias>", "Done": "<alias>" }
}