Footsteps...


I don't know how to code sounds. Please help. This is the code:

extends AudioStreamPlayer3D

onready var walk_sound = "res://concrete-footsteps-6752.mp3"                 <-- this is the line that it says unexpected indentifier on

func _physics_process(delta):

    if is_on_floor() and velocity.length() > 0:

        if !walk_sound.playing:

            walk_sound.play()

    else:

        if walk_sound.playing:

            walk_sound.stop()

Leave a comment

Log in with itch.io to leave a comment.