Hello everyone! I have a question: D :Is there a code here that allows one sound to play immediately after the previous one finishes? Because when I use code like play[""] , all the sound effects play and stop at the same time, but I want them to play one after another!
Viewing post in General Decker Question and Answer Thread
If you haven't already read it, I recommend checking out All About Sound.
In a simple linear script, like part of a cutscene, playing sounds in sequence is straightforward with sleep["play"]:
play["sound1"] # do anything else you want while the sound is playing... # ... sleep["play"] # wait for all playing sounds (sound1) to finish play["sound2"]
In more elaborate cases, with sounds playing while a deck remains interactive, you may want to rely upon the loop[] event or keep track of your own timer to trigger subsequent sound effects.
Does this help point you in the right direction?
I tried using the sleep[] code, but I found that when I wanted to play these music tracks, the other buttons on my screen became unclickable. I need players to be able to click them while listening to the music, so I tried using random, but it causes random playback from the music list. I'm trying to find a code that can control the sequential playback of music without affecting the screen content, but unfortunately I haven't found it. Maybe I need help again.(PS:Due to network issues, I wasn't sure if that message went through, so I sent it again 😌)
If you want background music playing while a deck remains interactive, you will definitely need a more complicated approach than sleep[]; the discussion in this thread has some examples that may do what you need.