How to dynamically control an animation track's values?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bli00

My game is 2D and my character needs to run/walk at different speed. So it makes sense to play the “walk” animation at varying “speed”. What’s the best way to do that?

:bust_in_silhouette: Reply From: jgodfrey

You don’t really say how you’re animating your player, but assuming there’s an AnimationPlayer at work here, the play function has a custom_speed argument that defaults to 1.0. When your player is running, simply set that to some higher value.