BuildcordDocs

Repeat

Run the steps that follow a set number of times.

flow.repeat runs the steps wired to Each time again and again, then continues from When finished. It can't fail.

Settings

SettingWhat it does
TimesHow many passes, up to 500. The default is 3. A token works, such as {option.count}.

Ways out

Way outTaken when
Each timeFor every pass. Wire it to the steps to repeat.
When finishedAfter the last pass.

Produces

{loop.index}: which pass this is, starting at 1.

Notes

  • A path inside the loop that leads nowhere returns to the loop for its next pass.
  • Leave early with Stop a loop, or skip the rest of a pass with Skip to the next pass.

Example

A /roll command: repeat {option.dice} times, adding randint(1, 6) to a total each time.

On this page