Godot Version
4.2
Quesion
I have AudioSteamPlayer in project. This must play after win and code is wait when finished sound and code change scene.
Breakpoint showing to code get await but await is freeze project.
func death(GoodEnd: bool, Version: String):
if alive:
alive = false
if GoodEnd: # Work on win
print(0)
$End.play() # AudioSreamPlayer
$Flash.visible = true
print(1)
await $End.finished # Breakpoint work
print(2) # Project freezed
Globals.Ending = Version
get_tree().change_scene_to_file("res://Scenes/ending.tscn")
else:
Globals.Scream = Version
get_tree().change_scene_to_file('res://Scenes/screamer.tscn')
P. S. Sorry if I make a mistakes is text. I just know English not very well.