Skip to content

Any States

Any States represent all other states in the current state machine. They are a convenience feature to allow many states to transition to a single state without having to create multiple transitions.

Any State nodes are removed during compile and their transitions copied to all applicable states in the current FSM scope. These nodes do not exist during run-time.

When an Any State adds transitions to a node an icon will appear on the state. Hovering the icon will display which Any State is adding transitions. Double clicking the icon will bring focus to that Any State.

Exclude from Any State

Individual states can be excluded from being impacted by an Any State node with Exclude from Any State.

AnyState

Scoping

An Any State will only impact the immediate state machine it is placed in. This means an Any State won't impact any nested sub state machine states, but it will impact the sub state machine itself.

In the picture below you can see the purple dot is on the state 'Sub State Machine' but it is not present in its sub states. This means the transition to the 'B' state will be added to 'Sub State Machine', but not to 'Sub State A' or 'Sub State B'.

AnyStateSubStateMachineScope

Any States support Gameplay Tag Queries to limit the scope of an Any State to states that have matching tags. These tags only exist in the editor and do not impact run-time. The maximum scope of a tag is still restricted to the current FSM scope.

AnyStateTagsOverview

  1. On the Any State edit the Any State Tag Query. This opens the normal Unreal Engine Gameplay Tag Editor. Create a query to determine when this Any State should be used.

    AnyStateTags

  2. On each state you want to be impacted by the Any State edit the Any State Tags and assign tags. Colors will be auto assigned based on the hash of the Any State query.

    StateTags

Properties

Any State Tag Query

The query to use when determining if a state should be impacted. If empty all states will be impacted unless they are manually excluded with Exclude from Any State.

Override Color

If enabled the Any State Color will be used for this Any State, no matter if a tag query is defined or not.

Allow Initial Reentry

If the immediate states leading out of the Any State node should be impacted by that Any State node. Essentially this is like saying if the Any State has transition T connected to node B, should node B have a self transition T as well.

Default Settings

The default Any State color and how many icons are displayed per state can be configured under Editor Preferences.