playSFXQ(which channel, which folder, clip0, clip1, priority)

From pinHeck Wiki
Jump to: navigation, search

Example:

playSFXQ(0, 'B', 'A', 'A', 255);


Works just like playSFX but queues the clip to play once whatever is already playing in that channel finishes.

Let's use Attack from Mars as an example. Destroying the second saucer has the explosion + "Well Done" and then says "Extra Ball is lit". If you needed to do something like this in your game, you'd play the normal sound via playSFX, then queue up whatever is said next with the playSFXQ command. This allows you to separate things out.

In America's Most Haunted, revealing a Ghost Minion triggers a randomized quote. playSFX is used so the character says "It's a class five..." and playSFXQ is used to finish the quote "...Free Roaming Vapor Mist Anomaly!"

In the code it looks like this:


playSFX(0, 'M', 'C', '9', 255); //"It's a Class [number]!"

video('M', 'F', '9', allowSmall, 0, 250); //Play video

playSFXQ(0, 'M', 'D', '0' + random(10), 255); //"Something Something Specter!"


It's a good idea to do something between the SFX calls to ensure the first sound gets going before you enqueue a second.