compile_state_transitions
Compile animation state machine transitions in Godot by connecting states with conditions, crossfade durations, and advance modes for controlled state changes.
Instructions
Transition Logic Compiler: Write transition arrow connections between state blocks, attaching evaluation parameters like 'speed > 0.1' or 'is_attacking == true'.
Each transition dict must have:
'from': source state name
'to': destination state name
'condition': optional condition string
'xfade_time': crossfade duration in seconds (default 0.2)
'advance_mode': 0=manual, 1=auto, 2=at_end (default 1)
Args: scene_path: Absolute path to the .tscn scene file. state_machine_resource_id: Sub-resource id of the AnimationNodeStateMachine. transitions: List of transition dicts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| transitions | Yes | ||
| state_machine_resource_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |