SoundSequence

From ZDoom Wiki

Jump to: navigation, search

void SoundSequence (str sndseq);

Usage

Plays a sound sequence defined in SNDSEQ lump.

Examples

In this example, I've created a heartbeat effect in a level I'm working on that gets used after a frightening experience happens to the player. First off, you have to make sure you've got a sequence set up in the SNDSEQ lump. Mine looks like this:

  :Heartbeat
       volume 127
       playuntildone world/heart
       volume 64
       playuntildone world/heart
   end

Just a simple sequence that plays a loop of a beating heart - first time at full volume and the second time at half volume.

To have this play in your level, you need to call it in a script. A very, very simple and easy to use script. Here's my example:

   Script 1 (void)
   {
   SoundSequence ("Heartbeat");
   }

I have a linedef with it's special set to '80' (which is ACS_Execute), it's argument set to point to the script number (in this case, it would be '1'), and it's action set to Player Crosses Line.

Personal tools