Skip to content

Wait For Interval From Rate

Wait before running more actions using a rate per second.

The wait interval is calculated as 1 / Rate, so higher rates produce shorter waits.

Already running actions keep running, but other actions won't start until this action has finished.

Parameter Description
Rate Rate per second used to calculate the wait interval. The action waits for 1 / Rate seconds.
UseRealtime Uses unscaled time so the wait continues while gameplay is paused or slowed.

How It Works

  • Rate = 1 waits 1 second.
  • Rate = 2 waits 0.5 seconds.
  • Rate = 4 waits 0.25 seconds.
  • UseRealtime makes the wait use unscaled time.
  • Rate <= 0 finishes immediately without waiting.

Example

Use this action when you think in "times per second" instead of seconds.

For example, if an enemy should fire 3 times per second, set Rate to 3. The action waits about 0.33 seconds before the next action runs, which makes it easy to build a repeating fire loop.