How to play one sound effect after another?

How does Quest play one sound effect after another? I want one sound effect to play, finish, and then play another sound. After playing all the sound effects I want the whole thing to loop. Do I need timers for this?


Easiest thing, I think, to do is to use external software like audacity or acoustica, and merge all files you want to play into one file. This works well if you just want one track. If you want one to be scripted to end and then start another, obviously this method wouldn’t work. I always had a little trouble with multiple sounds.


If you're using Quest's play sound functions, I'm not sure there's an easy way to do it. Using timers may not work well because there may be a delay in the sound starting.

If you're outputting an HTML <audio> element, there's a few ways to do it. You could output multiple audio elements, then start each when the previous one ends. Or you could load the first sound, and then change the source when it ends. You have the javascript events playing (has started), ended (has ended), error (something went wrong), and canplay (has finished buffering and is ready to play) that you can use to control what plays when.


I don't quite understand what mrangel is saying, but I think he's just describing the way sound plays. I don't quite understand how that fixes the issue.


  1. Add a script/Output/play a sound.
  2. Click the "yes" bit of : "Wait for sound to finish before continuing"
  3. Do this for each consecutive sound you add.
  4. Make a new sound using e.g. AVS Audio Editor or any audio editor you have on your PC. Load each sound and copy and paste each one after the other into 1 single sound file and rename it.
  5. Add your newly created multiple sounds file as the Final script sound sample.

It turns out I do have audacity on my computer. I'll use that.

Thanks everyone!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums