:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/AnimationNodeStateMachineTransition.xml. .. _class_AnimationNodeStateMachineTransition: AnimationNodeStateMachineTransition =================================== **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` .. container:: contribute There is currently no description for this class. Please help us by :ref:`contributing one `! .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`../tutorials/animation/animation_tree` .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`advance_condition` | ``""`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`auto_advance` | ``false`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`disabled` | ``false`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`priority` | ``1`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`xfade_time` | ``0.0`` | +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed: .. rst-class:: classref-signal **advance_condition_changed** **(** **)** Emitted when :ref:`advance_condition` is changed. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_AnimationNodeStateMachineTransition_SwitchMode: .. rst-class:: classref-enumeration enum **SwitchMode**: .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_IMMEDIATE: .. rst-class:: classref-enumeration-constant :ref:`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. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_SYNC: .. rst-class:: classref-enumeration-constant :ref:`SwitchMode` **SWITCH_MODE_SYNC** = ``1`` Switch to the next state immediately, but will seek the new state to the playback position of the old state. .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_AT_END: .. rst-class:: classref-enumeration-constant :ref:`SwitchMode` **SWITCH_MODE_AT_END** = ``2`` Wait for the current state playback to end, then switch to the beginning of the next state animation. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_AnimationNodeStateMachineTransition_property_advance_condition: .. rst-class:: classref-property :ref:`String` **advance_condition** = ``""`` .. rst-class:: classref-property-setget - void **set_advance_condition** **(** :ref:`String` value **)** - :ref:`String` **get_advance_condition** **(** **)** Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the :ref:`AnimationTree` that can be controlled from code (see `Using AnimationTree <../tutorials/animation/animation_tree.html#controlling-from-code>`__). For example, if :ref:`AnimationTree.tree_root` is an :ref:`AnimationNodeStateMachine` and :ref:`advance_condition` is set to ``"idle"``: :: $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0) .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeStateMachineTransition_property_auto_advance: .. rst-class:: classref-property :ref:`bool` **auto_advance** = ``false`` .. rst-class:: classref-property-setget - void **set_auto_advance** **(** :ref:`bool` value **)** - :ref:`bool` **has_auto_advance** **(** **)** Turn on the transition automatically when this state is reached. This works best with :ref:`SWITCH_MODE_AT_END`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeStateMachineTransition_property_disabled: .. rst-class:: classref-property :ref:`bool` **disabled** = ``false`` .. rst-class:: classref-property-setget - void **set_disabled** **(** :ref:`bool` value **)** - :ref:`bool` **is_disabled** **(** **)** Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeStateMachineTransition_property_priority: .. rst-class:: classref-property :ref:`int` **priority** = ``1`` .. rst-class:: classref-property-setget - void **set_priority** **(** :ref:`int` value **)** - :ref:`int` **get_priority** **(** **)** Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeStateMachineTransition_property_switch_mode: .. rst-class:: classref-property :ref:`SwitchMode` **switch_mode** = ``0`` .. rst-class:: classref-property-setget - void **set_switch_mode** **(** :ref:`SwitchMode` value **)** - :ref:`SwitchMode` **get_switch_mode** **(** **)** The transition type. .. rst-class:: classref-item-separator ---- .. _class_AnimationNodeStateMachineTransition_property_xfade_time: .. rst-class:: classref-property :ref:`float` **xfade_time** = ``0.0`` .. rst-class:: classref-property-setget - void **set_xfade_time** **(** :ref:`float` value **)** - :ref:`float` **get_xfade_time** **(** **)** The time to cross-fade between this state and the next. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`