Godot Version
4.2.2
Question
I want to switch an audio track in the animationplayer on/off in gdscript to have different footstep sounds depending in the ground surface.
this is what I got so far, but no luck (also tried audio:Footstep and Audio: etc.)
walk_animation = player.animation_player.get_animation("walk")
track_index_to_toggle = walk_animation.find_track("Audio/Footstep", TYPE_INT)
walk_animation.track_set_enabled(track_index_to_toggle, false)
track_index_to_toggle = walk_animation.find_track("Audio/MetalStep", TYPE_INT)
walk_animation.track_set_enabled(track_index_to_toggle, true)
And this is the animation player: