Sound sequences can be assigned to two different classes: doors and platforms. Door sounds are used for doors and moving polyobjects, and platform sounds are used for everything else that involves a moving sector. In addition, you can create sequences that belong to neither class and are only accessible through the ACS soundsequence command.
By default, which sound sequence is played when a sector moves is determined by the special used to activate the sector. You can override this behavior by placing one of the sound sequence things (1400-1411, see section 12, thing types) in the appropriate sector or by using the Sector_ChangeSound special to change the sector's sound sequence after the level has been loaded.
Sound sequences are defined using a simple, yet powerful language. Each sequence begins with a colon followed by the sequence's name and ends with an end command. Between them can be any number of commands to control how sounds are played. The general format of a soundsequence is:
:SequenceName
Command 1
Command 2
Command 3
...
end
Unless you plan to only use the sequence with the soundsequence command, you should also have a door or platform command (if not both) to assign it at least one ID. The commands that are understood are summarized below:
| normal | Sound is treated just like a normal sound |
|---|---|
| idle | Like normal, but with lower priority |
| static | Sound diminishes very rapidly with distance |
| none | Sound is heard full volume across the entire level |
| surround | Sound is heard full volume but is played in surround |
Door and platform IDs are considered distinct IDs, so one sequence could be assigned to door ID 0, and another could be assigned to platform ID 0. Which of the two sequences is played depends on which special is used to activate the associated sector or polyobject. Polyobjects always play a door sequence when they move. The various Door_ specials also play door sequences. All the other sequences play platform sequences. If you want a single sequence to be played for a specific ID no matter how it is activated, you should use both a door and platform command and assign it the same ID(s) with both of them.
Here is a sample (and not especially useful) soundsequence:
:ScaryDoorSound
door 0
playuntildone cyber/sight
playrepeat cyber/hoof
stopsound cyber/death
end
This sound can be attached to a sector with the 1400 things or a Sector_ChangeSound (tag, 0) special, and will be played whenever the sector opens or closes as a door. When the door starts moving, it will play the cyberdemon's sight sound. While the door continues moving, it will play the cyberdemon's hoof sound, and when the door stops, it plays the cyberdemon's death sound. Thus, it's not a very useful door sound, but it does demonstrate how sound sequences are used.