Skip to content

Transition Stack 2.6+

Multiple transition classes can be combined into a single transition using simple expressions to determine if a transition can pass or not. Operators can be assigned in the details panel and the expression will be automatically generated in the transition local graph.

TransitionStack

Modifying the Transition Stack

  1. In a state machine blueprint select a transition node. In the details panel under the Transition Stack click the plus button.
  2. Select the transition class to use. This will automatically add a call to this instance's CanEnterTransition function to the local graph.
  3. Select the Mode to use [AND, OR] or whether you want to NOT the operation.

As long as Auto Format Graph is checked operator nodes will be automatically added to the local graph to create the expression you made.

  • CanEnterTransition nodes will always be added for the stack, regardless of auto formatting.

To generate more complex expressions, uncheck Auto Format Graph and configure the local graph using operator nodes. You can copy and paste the automatically added CanEnterTransition nodes if needed.

TransitionStackDetails

TransitionStackOperatorNodes

The final node consists of the

  1. Transition Class
  2. Transition Stack

Using the Transition Stack

When the transition evaluates at run-time the expression you created in the local graph will determine if the transition passes.

All optional transition nodes, such as OnNodeInitialized and OnTransitionEntered will be executed for every stack element in the order of the array and after the primary node instance methods fire. OnTransitionEntered will fire if the transition passes, regardless of whether that specific stack element evaluated to true or not.

Autobound events do not natively support the transition stack. However if Auto Format Graph is disabled, the generated expression could be moved to any Event Trigger Result Nodes if desired.

Stack Functions

The following functions are available from the transition instance:

Considerations

Transition Stack expressions can save time for prototyping or non-performance critical systems. For optimal performance and memory usage, using a single transition class (or no transition class) is recommended over using the transition stack.

At run-time, every transition class in the transition stack will be instantiated. Additionally, using any expressions in the local graph will require the blueprint graph is evaluated, even with pure C++ transitions.