Is there a way to detect when a sound has ended? I want to play one sound, and then as soon as it ends play another sound. (What sound plays next will be determined by a variable.)
One method I haven’t tried yet because it seems overly complicated is to know the exact length of every sound and start a millisecond timer as soon as I start playing a sound, and do the next sound when the timer runs out, but I feel like it would be tricky to track both what sound is supposed to play next and its length. Unless… Is there a way to make a table? So I would use song.filename and song.length or something like that?
But anyway I feel like there should be a simpler way, like just a built in function called “ifSoundComplete” or something like that. Thanks!