For Each Actor
For Each Actor
Each
Done
- Group
- Flow
- In the node menu
- Flow › Loops › For Each Actor
- Where it can be used
- Scheme graphs
- Presets
What it does
Section titled “What it does”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.
Example
Section titled “Example”For Each Actor
Each of Accomplices
Each
Done
When to use it
Section titled “When to use it”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.
Good to know
Section titled “Good to know”- 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.
Settings
Section titled “Settings”| Label | Draft key | Type | Default | Shown if, tooltip and notes |
|---|---|---|---|---|
| From | From | among | not in the data | |
| Where | Where | rows of ConditionData | not in the data | |
| Order | Order |
| "AsListed" | The order the actors get their turn in. As listed: the order of the group. |
| If Tied | IfTied |
| not in the data | Shown if there can be a tie What decides the order of actors of the same age. |
| At most | Limit | integer | 0 | The most actors that get a turn. No limit: everyone.
|
| Each One Is | StoreIn | Store In (Actor) | not in the data | A 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.
|
Outputs
Section titled “Outputs”- Each
- Done
In a draft
Section titled “In a draft”"type""For Each Actor"- Presets (also a
"type") "For Each Accomplice": setsFrom.Pool=List
"set"keysFrom,Where,Order,IfTied,Limit,StoreIn"then"keys"Each","Done"
"<alias>": { "type": "For Each Actor", "then": { "Each": "<alias>", "Done": "<alias>" }}