aboutsummaryrefslogtreecommitdiff
path: root/client/player/character/character.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/player/character/character.gd')
-rw-r--r--client/player/character/character.gd7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/player/character/character.gd b/client/player/character/character.gd
index 36ff1323..385481cc 100644
--- a/client/player/character/character.gd
+++ b/client/player/character/character.gd
@@ -39,6 +39,8 @@ var current_animation := "idle"
"E. Parsley": $Main/Head/Hair3
}
+@onready var step_sounds: PlayRandom = $Steps
+
func _ready():
play_animation("idle")
@@ -81,6 +83,11 @@ func select_hairstyle(id: int):
func play_animation(name_: String):
current_animation = name_
hand_animations.play(name_)
+
+ if name_ == "walk":
+ step_sounds.start_autoplay()
+ else:
+ step_sounds.stop_autoplay()
func _on_hand_animations_animation_finished(_name):
hand_animations.play(current_animation)