Difference between revisions of "playSFXQ(which channel, which folder, clip0, clip1, priority)"

From pinHeck Wiki
Jump to: navigation, search
(Created page with "'''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 At...")
 
Line 11: Line 11:
  
 
In the code it looks like this:
 
In the code it looks like this:
 +
  
 
playSFX(0, 'M', 'C', '9', 255); //You can keep beating them, but they only go up to Class 9
 
playSFX(0, 'M', 'C', '9', 255); //You can keep beating them, but they only go up to Class 9
 +
 
video('M', 'F', '9', allowSmall, 0, 250); //Ghost level cap at 9
 
video('M', 'F', '9', allowSmall, 0, 250); //Ghost level cap at 9
 +
 
playSFXQ(0, 'M', 'D', '0' + random(10), 255); //Something Something Specter!
 
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.
 
It's a good idea to do something between the SFX calls to ensure the first sound gets going before you enqueue a second.

Revision as of 15:29, 12 September 2015

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); //You can keep beating them, but they only go up to Class 9

video('M', 'F', '9', allowSmall, 0, 250); //Ghost level cap at 9

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.