Called when the state is ending. It is not advised to switch states during this event. The state machine will already be in the process of switching states.
Force set the active flag of this state. This call is replicated and can be called from the server or from a client. The caller must have state change authority.
When calling from a state, it should be done either OnStateBegin or OnStateUpdate. When calling from a transition it should be done from OnTransitionEntered and limited to the previous state. If this is called from other state or transition methods it may cause issues with the normal update cycle of a state machine.
Parameters:
bValue
True activates the state, false deactivates the state.
bSetAllParents
Sets the active state of all super state machines. A parent state machine won't be deactivated unless there are no other states active.
bActivateNow
If the state is becoming active it will fully activate and run OnStateBegin this tick. If this is false it will do so on the next update cycle.
Signals to the owning state machine to process transition evaluation. This is similar to calling Update on the owner root state machine, however state update logic (Tick) won't execute. All transitions are evaluated as normal starting from the root state machine down. Depending on super state transitions it's possible the state machine this state is part of may exit.
Forcibly move to the next state providing this state is active and a transition is directly connecting the states.
This should be done either OnStateBegin or OnStateUpdate. If this is called from other state methods it may cause issues with the normal update cycle of a state machine.
Parameters:
NextStateInstance
The state node instance to switch to.
bRequireTransitionToPass
Will evaluate the transition and only switch states if it passes.
bActivateNow
If the state switches the destination state will activate and run OnStateBegin this tick. Otherwise, it will do so in the next update cycle.
Forcibly move to the next state providing this state is active and a transition is directly connecting the states.
This should be done either OnStateBegin or OnStateUpdate. If this is called from other state methods it may cause issues with the normal update cycle of a state machine.
Parameters:
NextStateName
The name of the state to switch to.
bRequireTransitionToPass
Will evaluate the transition and only switch states if it passes.
bActivateNow
If the state switches the destination state will activate and run OnStateBegin this tick. Otherwise, it will do so in the next update cycle.
Forcibly move to the next state providing this state is active and a transition is directly connecting the states.
This should be done either OnStateBegin or OnStateUpdate. If this is called from other state methods it may cause issues with the normal update cycle of a state machine.
Parameters:
TransitionInstance
The transition which should be taken to the next state.
bRequireTransitionToPass
Will evaluate the transition and only switch states if it passes.
bActivateNow
If the state switches the destination state will activate and run OnStateBegin this tick. Otherwise, it will do so in the next update cycle.
Forcibly move to the next state providing this state is active and a transition is directly connecting the states.
This should be done either OnStateBegin or OnStateUpdate. If this is called from other state methods it may cause issues with the normal update cycle of a state machine.
Parameters:
TransitionName
The outgoing transition name which should be taken to the next state.
bRequireTransitionToPass
Will evaluate the transition and only switch states if it passes.
bActivateNow
If the state switches the destination state will activate and run OnStateBegin this tick. Otherwise, it will do so in the next update cycle.
Retrieve the UTC time when the state last started. If this is called before the state has started once, or before initialization (such as during an editor construction script) the datetime will be initialized to 0.
Return: DateTime in UTC. This is when the state started locally and won't be in sync with the server.
Retrieve the time the server spent in the state. This is retrieved from network transactions and can match the TimeInState from the server.
This will only match the server after OnStateEnd() is called and provided the client received the replicated transition. When using client state change authority, USMStateMachineComponent::bWaitForTransactionsFromServer must be set to true for the client to receive the updated server time.
When the server time can't be calculated the local time will be returned instead, using GetTimeInState().
The return value is impacted by bCalculateServerTimeForClients of the state machine component's network settings, and whether the state machine is networked, a client or server, or is ticking.
This function is no longer used. Set bRegisterWithContextMenu from the C++ constructor or use the NotPlaceable UClass specifier to prevent registration.
Called right before the state has started. This is meant for an observer to be aware of when a state is about to start. This will only be called for state stack instances if the state is allowed to execute logic. Do not change states from within this event, the state change process will still be in progress.
Called right after the state has started. This is meant for an observer to be aware of when a state has started. If you need to change states this event is safer to use, but ideally state changes should be managed by transitions or from within the state.
This will only be called for state stack instances if the state is allowed to execute logic, and will be called before the primary instance's OnPostStateBeginEvent. It is not safe to change states from this event when broadcast from a state stack instance.
Called before the state has updated. This is meant for an observer to be aware of when a state is updating and it is not advised to switch states from this event.
Called before the state has ended. It is not advised to switch states during this event. The state machine will already be in the process of switching states.
Restrict placement unless rules can be verified. Ex: If the rule says this can only be connected from a state node, then this won't show in the context menu unless dragging from a state node.
When true only the Name set above will be displayed. The node cannot be renamed. This allows duplicate names to be displayed in the same graph. The node's internal name and local graph name will still be unique.
Prevents conditional transitions for this state from being evaluated on Tick. This is good to use if the transitions leading out of the state are event based or if you are manually calling EvaluateTransitions from a state instance.
When true and a state is started OnStateBegin fires and then transitions are evaluated in the same tick. When false and a state is started OnStateBegin fires on the first tick and transitions are evaluated on the second tick.
This can be chained with other nodes that have this checked making it possible to evaluate multiple nodes and transitions in a single tick.
When using this consider performance implications and any potential infinite loops such as if you are using a self transition on this state.
Individual transitions can modify this behavior with bCanEvalWithStartState.
If this state is allowed to ever be considered an end state. Disabling this will prevent a state machine that is configured to stop on end state from stopping when reaching this state, even if this state is technically an end state.