State-Management is the implementation of a Design Pattern, with the help of this design pattern we can manage what happens when an Actor enters a certain state or write logic based on the Actor’s current state. This design pattern makes the implementation of multiple states & handling transition between states very easy.
The Ashen State Manager enables building the types of states that you might find in a large & complex action RPG.
The State Manager Component is the component for managing the states for an actor. This component can be added to any actor that has multiple states & needs to manage those states & the transitions between states.
State Class and State Machine
States are Blueprint children of the BP_BaseState class. They define what the State does in Blueprint scripting. The states can be used for running certain logic when entering or leaving states or writing logic based on the Current State.
Any State Can handle transitioning between a finite number of states. When you want to transition state, you can call the function “Run State Machine” from the state manager component. This will find a state machine by tag & execute the “Run State Machine” function within the state object class. This function is intended to be used when you want the actor to transition from one state to another.
The state machine can be used any time you need to transition between a finite number of states
Basic Requirements
The State Manager has no requirements other than adding the component to an actor. Once the component is added to the actor, you can select the component from the details panel & set the finite number of state classes that the state manager has access to. If no state class is added, one will simply be created & assigned a tag at runtime.