Wiki

Case Status
Log In

Wiki

 
Home ยป Workflow»Repeating Actions at a Regular…
Index
Navigation
Community Wiki

Repeating Actions at a Regular Interval

Use the Wait action and 2 States to repeat actions at a regular interval:

 

Wait

The FINISHED event is sent when a state finishes running all of its actions. In this case, just the Wait action.

Tip: For a random delay, you could use the Random Wait action.

 

Do Something

Put any actions you want to run in this state. You can also branch to other states as long as you loop back to the Wait state.

If you want to do a lot of things in the state, consider making a new FSM that is activated using Enable FSMActivate GameObject, or Run FSM.

This keeps the Timer FSM simple. Always try to keep each FSM as simple as possible while doing what it needs to do. 

Tip: If you want to start with Do Something and then Wait, make it the Start State.

 

Action Sequence

You can also use an Action Sequence in a single state if the behaviour is simple:

In this example, the Wait action runs first, when it finishes the Activate Game Object action activates another Game Object. That action finishes immediately and the FINISHED event is sent to loop the state.

Tip: To loop a state drag the transition away from the State and then back onto itself:

Note, the activated Game Object can have its own FSM that deactivates the Game Object when it's finished, resetting the loop.

Tags:

Last modified on 2/12/2019 1:07 AM by User.

  • RSS Feed