Repeater is a specialized Action State that restarts its contained Actions after they finish. Use it when one behavior should run a fixed number of times or continue until a transition interrupts it.

Repeater is added as a State in the graph. It is not an Action added inside a regular Action State.

Set up a Repeater

  1. Add a Repeater State to the graph.
  2. Add the Actions that make up one complete repetition.
  3. Enable Repeat Forever for an indefinite loop, or leave it disabled and set Repeat Count to the required number of complete passes.
  4. Add outgoing transitions and select when their Conditions should be evaluated.

Use a Repeat Count of 1 or greater. A value of 1 runs the contained Actions once. When Repeat Forever is enabled, the Inspector hides Repeat Count because the count is ignored.

How it runs

Repeater runs its contained Actions with the configured Sequence or Parallel execution type. When every enabled Action finishes, Repeater counts one completed pass, restarts the Actions, and either begins the next pass or finishes the State.

An Action that returns Running can make one pass span several updates. The Repeater does not increment its completed count until the entire contained Action list finishes.

Choose transition timing

  • Continuous can interrupt a finite or infinite Repeater while its Actions are running.
  • On Iteration Complete evaluates after one complete pass of the contained Actions.
  • On State Finished evaluates after the configured Repeat Count is reached. A Repeater using Repeat Forever does not finish on its own, so it needs a Continuous or On Iteration Complete transition to leave the State.

For example, a Repeater can play a three-step warning sequence twice before entering an Alarm State. Set Repeat Forever off, set Repeat Count to 2, and use an On State Finished transition to enter Alarm after the second complete pass.

Verify the Repeater

Add one Action with a visible or logged result and test a Repeat Count of 2. Confirm that the Action completes twice and that an On State Finished transition runs only after the second pass. Then enable Repeat Forever and confirm that the chosen interrupt transition can still leave the State.