|Topic was automatically imported from the old Question2Answer platform.
|Published before Godot 3 was released.
After player wins the “round” they’re taken to a screen showing them their stats.
I want to play
youWonEffect sound effect.
After it finishes I want to play the
Currently I have it as such:
globals.musicPlaying = load("res://audio/youWonMusic.ogg")
… and due to this it plays them both at the same time.
Now I know I could use a signal that when the
soundSamplePlayer finishes playing it could trigger the music but unfortunately I use the
soundSamplePlayer and the
streamPlayer as a global scene so it can play across scenes and send many different music tracks and sound effects to them.
How can I then get it to play the music after the sound effect in this situation?
Advice appreciated a plenty.
As a workaround you can use a timer to wait for some time, set the delay to the duration of the sound effect (you can get it from the resource, no need to hardcode that), then play the results.
If your problem is worse due to the fact you use globals, here is a personal advice: don’t use globals in this situation
Zylann | 2016-11-09 13:41