Get end sound in any way(message or callback)
You could always create a timer with the length of the intro and run in at the same time as the sound.
But maybe there’s a way to get the callback directly from the sound.
Yes i can, but for that i need to know sound lenght
Don’t you?
I actually did this myself when making Operator.
It turned out beautifully, but at the same time, it did require some hacking together to make alarm timings that managed to loop sounds. That is made a bit easier now with an actual built-in alarm (I had made one myself).
I’m told that FMOD is the best, if not the only sound manager asset for Defold. That might have some sort of “get sound length” feature. I might experiment with this.
We will make several improvements to audio playback during 2019. Getting a callback when a sound is finished is among them.
If you use FMOD it’s really easy to tell when a sound is playing or not.
if sound:get_playback_state() == fmod.STUDIO_PLAYBACK_STOPPED …
I look at fmod. But not try it yet. It looks big and complex, for me.
It is pretty easy once you get it. If you have questions ask me and I can help.