Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | IG2 |
How do I change an animation in AnimationTree to another using a script?
extends AnimationTree
func _ready():
self.?????
pass
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | IG2 |
How do I change an animation in AnimationTree to another using a script?
extends AnimationTree
func _ready():
self.?????
pass
Reply From: | spaceyjase |
set("parameters/state_machine_name/state_name/blend_2/blend_amount", 0.5)
You can see parameter names by hovering over them in the editor (e.g. Blend Amount); you can copy them by right-clicking a parameter and using the context menu.
I asked how to change animation. AnimationNodeAnimation
Blend2 and other nodes are available in Parameters, but AnimationNode is not there.
IG2 | 2023-01-25 15:34
Not sure why you’d change the animation here; perhaps you mean to use a state machine instead of a blend? The node itself is output only I believe, with just one property of ‘animation’ (which does have a setter).
AnimationNodeAnimation — Godot Engine (stable) documentation in English
spaceyjase | 2023-01-25 20:23