Godot Version
4.3
Question
Whats the best way to call animations on an animationPlayer? Usually i just use one big function to match animations but it gets pretty complicated after more than 3 or 4 animations. I mainly just need idle, walking, and shooting animations that have a delay before entering walking again. Thanks!
I guess what you are looking for is a state-machine. There are a bunch of tutorials on youtube
The best way is to write a state-machine code, it is easier to maintain it and to avoid all-in-one function based code. The state machine implemantation is not very complicated, you can read about it here, just to have an idea of what it is: State
and then go here for Godot tutorial: State design pattern — Godot Engine (3.2) documentation in English
I would recommend firstly to understand the idea itself, and then read the implemantation for Godot, as for character behavior description you will need it quite often or maybe not : - ) it depends