Runs a subgraph once for every item in a list. Connect the body you want to repeat to the Loop Body output port. Inside the loop, the current item is available in the configured item assign — read it with an Assign Read node (or let Attribute nodes pick it up as the subject, if it’s a defdata struct). Assigns are shared across iterations: whatever iteration N writes, iteration N+1 sees. Handy for accumulating counters or per-item side effects.Documentation Index
Fetch the complete documentation index at: https://docs.twine.se/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
- Source list assign — assigns key holding the list to iterate.
- Current item assign — the loop body reads the item from here.
Control flow
- Halt branch inside an iteration (e.g. from a Flow Guard) stops that iteration but the loop continues with the next item.
- Halt flow (from a Flow Guard set to halt flow, or any unrecoverable error) stops the whole run immediately.
Tips
- Pair with Flow Filter first to narrow the list down — iterating a filtered list is usually cheaper and clearer than guarding inside the loop body.