I've been making a game for a week in Godot now, and I'm pretty happy with it, but I want to add sound effects to it. I did this:
onready var walk = $PlayerWalkSound
if velocity.x != 0 and is_on_floor() and !walk.playing:
walk.play()
elif walk.playing:
walk.stop()
But it doesn't work. It won't play the whole sound, it just repeats the first millisecond of it very quickly. The other sounds I use were easier to implement, but this is a little harder for me. Any ideas?