Classes:SoundSequence

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Sound sequence
Actor type Map spot Game MiniZDoomLogoIcon.png (ZDoom)
DoomEd Number 14066 Class Name SoundSequence


Classes: SoundSequence
 →HereticSoundSequence1
 →HereticSoundSequence2
 →HereticSoundSequence3
 →HereticSoundSequence4
 →HereticSoundSequence5
 →HereticSoundSequence6
 →HereticSoundSequence7
 →HereticSoundSequence8
 →HereticSoundSequence9
 →HereticSoundSequence10

Plays sound sequence number args[0] from the list of environmental sound sequences. It is possible to define in DECORATE sound sequences which have a preset argument value for use in Doom-format maps for Doom, Heretic or Strife. SoundSequence actors are not to be confused with the actorless sound sequence things.

A SoundSequence actor has two modes of operation:

  1. If the sound sequence assigned to it has a slot, then a separate SoundSequenceSlot actor is spawned (if not already present), and the sound sequence is added to the slot's list of choices. The sound sequence actor is then destroyed, never to be heard from again. The SoundSequence for the slot is automatically played on the new SoundSequenceSlot actor, and it should at some point execute the randomsequence command so that it can pick one of the other sequences to play. The slot sequence should also end with restart so that more than one sequence will have a chance to play. In this mode, it is very much like world $ambient sounds defined in SNDINFO but more flexible. This is the mode used by all predefined Heretic sound sequences.
  2. If the sound sequence assigned to it has no slot, then it will play the sequence when activated and cease playing the sequence when deactivated. In this mode, it is very much like point $ambient sounds defined in SNDINFO but, again, more flexible.

To assign a sound sequence, set the SoundSequence's first argument to the ID of the corresponding environment sequence you want to use, as defined in the SNDSEQ lump. If that sequence is a multiple-choice sequence, then the second argument selects which choice it picks.

DECORATE definition

ACTOR SoundSequence native
{
  +NOSECTOR
  +NOBLOCKMAP
  +DONTSPLASH
}