Skip to content
Patrick Hardy edited this page Jan 30, 2019 · 5 revisions

States have three main types: States, State Machines, and Conduits.

State

Contains Begin, Update, and End entry points.

On State Begin:

Once a state is entered the Begin logic will execute and will not execute again unless the state is re-entered.

On State Update:

This occurs every tick the state is active and the Delta Seconds from the last tick is passed in. If you disable tick and manage state updates on your own it is your responsibility for passing in the Delta Seconds.

On State End:

Always occurs when a state ends. This will trigger before any Transition Entered logic plays or the next state starts.

State Machine

It is possible to nest State Machines as many times as you want. Priority is given to the super state so you may want to have transitions leading out of the nested State Machine wait for its completion. There is a helper blueprint node: Has State Machine Reached End State which is perfect for this, but requires the nested State Machine have an end state.

Hierarchical Example

Super State Machine A changes states to sub State Machine B. Once sub B becomes active it will start the first state of sub B. On the next tick super A transitions are evaluated first. If a transition out is active it will then call On End on sub B triggering On End of the nested state.

Conduits

Conduits only consist of a boolean operation which must be true before any outgoing transitions are evaluated.

Properties

Clicking on a state will let you configure any properties of that state.

Always Update

Ensures that the On Update method is always called at least once before exiting a state. Without this it is possible the update method may not be called in the scenario where a state starts and then on the next tick it completes.

You can’t perform that action at this time.