-
Notifications
You must be signed in to change notification settings - Fork 8
States
States have three main types: States, State Machines, and Conduits.
Contains Begin, Update, and End entry points.
Once a state is entered the Begin logic will execute and will not execute again unless the state is re-entered.
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.
Always occurs when a state ends. This will trigger before any Transition Entered logic plays or the next state starts.
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.
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.
You can reference other State Machine blueprints to allow for re-usability. They function the same as nested state machines.
- The context of the super State Machine will be passed into the reference automatically.
- The reference will inherit the super State Machine's replication settings.
- The system attempts to catch circular referencing, but ultimately it is up to you to make sure you don't run into an infinite loop.
Conduits only consist of a boolean operation which must be true before any outgoing transitions are evaluated.
Clicking on a state will let you configure any properties of that state.
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.