Hi, I'm a beginner to godot, though have some experience with unity.
I'm trying to make a top-down shooter game (similar to Enter the Gungeon), and I wrote some code that gives me the angle of the mouse relative to the player (kidscancode 8-way movement tutorial)
I made some sprites for each direction the character faces, but now the challenge comes from setting the animation for the sprites.
I'm currently running a simple state machine with just walk and idle, which would change the animation based on the state, and also what direction the player's mouse points.
I have my animation names set to "stateName_direction#", ex. Idle_0 for player facing right and idle.
I was wondering if there was any way to do like
current_animation = (currentstate.name + "_" + mouseAngle)
I know I can just check which state the player is in, and then check the direction, but it would be much easier to do it this way.
Please let me know!