#I added walking sounds but it constantly plays when I'm not walking here's the code please help
1 messages · Page 1 of 1 (latest)
atm you check if it is playing. You just need to add more conditions to the "if" with the "and" keyword.
Example:
if !$footsteps_sound.playing and velocity.x != 0 and is_on_floor():
Here's the docs for the if keyword. Altho the use of "and" and other boolean keywords seems to be covered elsewhere.
https://docs.godotengine.org/en/4.3/tutorials/scripting/gdscript/gdscript_basics.html#if-else-elif
Godot Engine documentation
GDScript is a high-level, object-oriented, imperative, and gradually typed programming language built for Godot. It uses an indentation-based syntax similar to languages like Python. Its goal is to...