Classes:SoundSequence

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do not need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it's actually harmful as it can cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
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
}