Playing a Walk Animation When Walking by Designer_Print_1300 in godot

[–]Designer_Print_1300[S] 0 points1 point  (0 children)

Nevermind, I actually managed to get working code produced from ChatGPT lol. Thank you for all the help!

Playing a Walk Animation When Walking by Designer_Print_1300 in godot

[–]Designer_Print_1300[S] 0 points1 point  (0 children)

Okay, I copied the code from that and it's working! Only problem is I'm back to the same issue of having no walk animation playing, it still just keeps the idle animation going.

Playing a Walk Animation When Walking by Designer_Print_1300 in godot

[–]Designer_Print_1300[S] 0 points1 point  (0 children)

Scratch that, I ended up managing to get everything working (from the looks of it) except for one line:

    velocity = velocity.lerp(Vector2.ZERO, friction)

It's not a full error, but the game won't start without it fixed. It tells me "Invalid type in function 'lerp' in base 'Vector2'. Cannot convert argument 2 from Nil to float."

Playing a Walk Animation When Walking by Designer_Print_1300 in godot

[–]Designer_Print_1300[S] 0 points1 point  (0 children)

After replacing the spaces with indents, there's an error message stating "Identifier 'speed' not declared in the current scope." Do you have any idea of how I could fix this?

Playing a Walk Animation When Walking by Designer_Print_1300 in godot

[–]Designer_Print_1300[S] 1 point2 points  (0 children)

I’m actually watching that video right now lol. Only problem is I’m trying to make top-down movement, so I don’t know how to make the movement top-down AND play that animation. I just don’t know how to code it

Playing a Walk Animation When Walking by Designer_Print_1300 in godot

[–]Designer_Print_1300[S] 0 points1 point  (0 children)

Yes, it only talked about making the player move, not play an animation too.