AnimationNodeStateMachineTransition

Inherits: Resource < RefCounted < Object

Tutorials

Properties

StringName

advance_condition

&""

String

advance_expression

""

NodePath

advance_expression_base_node

NodePath("")

bool

auto_advance

false

bool

disabled

false

int

priority

1

SwitchMode

switch_mode

0

Curve

xfade_curve

float

xfade_time

0.0

Signals

  • advance_condition_changed ( )

Emitted when advance_condition is changed.

Enumerations

enum SwitchMode:

  • SWITCH_MODE_IMMEDIATE = 0 --- Switch to the next state immediately. The current state will end and blend into the beginning of the new one.

  • SWITCH_MODE_SYNC = 1 --- Switch to the next state immediately, but will seek the new state to the playback position of the old state.

  • SWITCH_MODE_AT_END = 2 --- Wait for the current state playback to end, then switch to the beginning of the next state animation.

Property Descriptions

Default

&""

Setter

set_advance_condition(value)

Getter

get_advance_condition()

Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the AnimationTree that can be controlled from code (see Using AnimationTree). For example, if AnimationTree.tree_root is an AnimationNodeStateMachine and advance_condition is set to "idle":

$animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0))

Default

""

Setter

set_advance_expression(value)

Getter

get_advance_expression()

Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code.


Default

NodePath("")

Setter

set_advance_expression_base_node(value)

Getter

get_advance_expression_base_node()

The path to the Node used to evaluate an Expression if one is not explicitly specified internally.


Default

false

Setter

set_auto_advance(value)

Getter

has_auto_advance()

Turn on the transition automatically when this state is reached. This works best with SWITCH_MODE_AT_END.


Default

false

Setter

set_disabled(value)

Getter

is_disabled()

Don't use this transition during AnimationNodeStateMachinePlayback.travel or auto_advance.


Default

1

Setter

set_priority(value)

Getter

get_priority()

Lower priority transitions are preferred when travelling through the tree via AnimationNodeStateMachinePlayback.travel or auto_advance.


Default

0

Setter

set_switch_mode(value)

Getter

get_switch_mode()

The transition type.


Setter

set_xfade_curve(value)

Getter

get_xfade_curve()

Ease curve for better control over cross-fade between this state and the next.


Default

0.0

Setter

set_xfade_time(value)

Getter

get_xfade_time()

The time to cross-fade between this state and the next.