@cybereality said:
Might be the case that nothing is broken. The sound is playing, but you are calling it so many times and so fast that it is stuck looping the first moment (therefore you hear nothing).
Your reference to the speed variable made me think. So I tried to set "$Open.play()" after "if speed > 0 and not case_stopped:" and now it works. Thank you so much.
Code before (No Sound):
func _on_Timer_timeout():
if speed > 0 and not case_stopped:
speed -= 0.5
elif speed <= 0:
case_stopped = true
panel.get_node("TextureRect").texture = texture_rects[index_number].texture
panel.show()
$Open.play()
Code after (With Sound):
func _on_Timer_timeout():
if speed > 0 and not case_stopped:
$Open.play()
speed -= 0.5
elif speed <= 0:
case_stopped = true
panel.get_node("TextureRect").texture = texture_rects[index_number].texture
panel.show()