ambient_random

An ambient_random plays one of up to five sounds at its position, picked at random each time you turn it on. It
never picks the sound it played last, so the same sound doesn't play twice in a row.
It works like ambient_generic, but it has no play modes and can't play MP3 files.
Attributes
targetnameTriggering the entity starts a sound, and if the sound loops, the next trigger stops it. See Common keys.
messageSets the first sound, which is the one that plays when the map starts. It can be a .wav file in the sound/ folder or a sentence from sound/sentences.txt, with a ! in front of its name.
If you leave this key empty, the first of the other sounds that is set takes its place.
noiseSets the second sound to pick from, a .wav file or a sentence like WAV Name.
noise1Sets the third sound to pick from.
noise2Sets the fourth sound to pick from.
noise3Sets the fifth sound to pick from.
healthSets how loud the sound is, from 0 for silent up to 10 for full volume.
10presetPicks a ready-made effect that changes the sound while it plays. If you pick a preset, the entity ignores Volume, Start Volume, the fade, pitch and spin keys, the LFO keys and Incremental spinup count, because the preset sets all of these itself. Every preset fades the sound in when it starts. In the list, "spins up" means the pitch rises as the sound starts, and "spins down" means it falls when you turn the sound off.The 28 choices
None (0)volstartSets the volume a fade in starts from and a fade out ends at, from 0 for silent up to 10 for full volume.
0fadeinFades the sound in from Start Volume when it starts, from 1 for the fastest fade up to 100 for the slowest, and 0 means no fade in.
0fadeoutFades the sound out to Start Volume when you turn it off, from 1 for the fastest fade up to 100 for the slowest, and 0 means the sound stops at once.
0pitchSets the pitch of the sound: 100 is normal, 50 is one octave lower, 200 is one octave higher and 255 is the highest.
100pitchstartSets the pitch a spin up starts from and a spin down ends at.
100spinupRaises the pitch from Start Pitch to Pitch when the sound starts, from 1 for the fastest spin up to 100 for the slowest, and 0 means no spin up.
0spindownLowers the pitch to Start Pitch when you turn the sound off, from 1 for the fastest spin down to 100 for the slowest, and 0 means no spin down.
0lfotypeMakes the pitch or the volume swing up and down while the sound plays (LFO means "low frequency oscillator").
- Off (0) - No swing
- Square (1) - Jumps between high and low
- Triangle (2) - Rises and falls smoothly
- Random (3) - Jumps to random values
Off (0)lforateSets how fast the swing goes, from 0 up to 1000, and a higher value is faster.
0lfomodpitchSets how far the swing moves the pitch, in percent from 0 up to 100, and 0 means the pitch doesn't swing.
0lfomodvolSets how far the swing moves the volume, in percent from 0 up to 100, and 0 means the volume doesn't swing.
0cspinupMakes each trigger raise the pitch one step instead of turning the sound off. The steps go from Start Pitch up to the highest pitch, and this key sets how many there are, up to 100, with 0 turning it off.
0Flags
1Play EverywhereEvery player hears the sound at full volume, anywhere on the map
2Small RadiusPlayers hear the sound up to about 500 units away
4Medium RadiusPlayers hear the sound up to about 800 units away. This flag is set by default, and the entity also uses this radius when no radius flag is set
8Large RadiusPlayers hear the sound up to about 1250 units away
16Start SilentA looping sound doesn't start with the map, but waits for a trigger
32Not ToggledThe sound plays once per trigger, and triggering it while it plays starts it again from the beginning, so a trigger can't turn it off
Notes
- Each time you turn the entity on, it picks one of the other sounds that are set, so with only one sound set it plays that sound every time
- If one of the sounds is an
.mp3file, the entity leaves that sound out, and withdeveloper 1set in the console, the server console reports it - Without Not Toggled, the entity treats every sound as a loop, so the first trigger starts a sound and the next one stops it, and only the trigger that starts a sound picks a new one
- If you pick a preset, the entity ignores Volume because the preset sets the volume itself: most presets play at full volume, and the three pulse presets, "Slow Pulse", "Pulse" and "Quick pulse", play at half volume
- If you set more than one radius flag, the entity uses the smallest radius, and Play Everywhere wins over all of them
- If no sound is set at all, the entity is removed when the map starts, and with
developer 1set in the console, the console reports it
See also
ambient_generic- plays one sound, with play modes and MP3 filesambient_extraspeaker- plays a sound or a sentence on another entity, which it followsspeaker- plays random sentences of a sentence group, at random times- Music and sound - map music and sounds
Changes since 1.38
ambient_randomis new in SBO 2.0.0
