Ambient generic: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Flags: The ''Start Silent'' flag is dependent on the ''Is NOT Looped'' flag.)
(→‎Keyvalues: Niice! Automatic lipsynch. :) Haven't tried this on non-speech though. Might be speech specific.)
Line 104: Line 104:
:<string> Maximum distance at which this sound is audible.
:<string> Maximum distance at which this sound is audible.
;SourceEntityName
;SourceEntityName
:<target_destination> If an entity is specified, sound will come from this named entity instead of the location of ambient_generic.
:<target_destination> If an entity is specified, sound will come from this named entity instead of the location of ambient_generic. If the target is an NPC capable of lipsynching, it will lipsynch to the sound. {{todo|Is this speech specific? Try it with a long soundeffect.}}


==Flags==
==Flags==

Revision as of 15:51, 16 September 2006

Template:Wrongtitle

Entity Description

Ambient generic.png

Universal ambient sound. Use it to play and control a soundscript sound, a raw .wav sample or a single scripted sentence.

Keyvalues

Template:Kv targetname
message
<sound> Name of the GameSound entry for the sound to play. Also supports raw .wav filenames and sentence scripts.
health
<integer> Sound volume, expressed as a range from 0 to 10, where 10 is the loudest.
preset
Literal Value Dynamic Preset
0 None
1 Huge Machine
2 Big Machine
3 Machine
4 Slow Fade in
5 Fade in
6 Quick Fade in
7 Slow Pulse
8 Pulse
9 Quick pulse
10 Slow Oscillator
11 Oscillator
12 Quick Oscillator
13 Grunge pitch
14 Very low pitch
15 Low pitch
16 High pitch
17 Very high pitch
18 Screaming pitch
19 Oscillate spinup/down
20 Pulse spinup/down
21 Random pitch
22 Random pitch fast
23 Incremental Spinup
24 Alien
25 Bizzare
26 Planet X
27 Haunted
volstart
<integer> Start Volume
fadein
<integer> Fade in time (0-100)
fadeout
<integer> Fade out time (0-100)
Template:Ep1 add
<integer> Fade in time (0-100). "fadein" deprecated
Template:Ep1 add
<integer> Fade out time (0-100). "fadeout" deprecated
pitch
<integer> Sound pitch, expressed as a range from 1 to 255, where 100 is the sound's default pitch.
pitchstart
<integer> Start pitch, expressed as a range from 1 to 255, where 100 is the sound's default pitch.
spinup
<integer> Spin up time (0-100)
spindown
<integer> Spin down time (0-100)
lfotype
<integer> LFO type 0)off 1)sqr 2)tri 3)rnd
lforate
<integer> LFO rate (0-1000)
lfomodpitch
<integer> LFO mod pitch (0-100)
lfomodvol
<integer> LFO mod vol (0-100)
cspinup
<integer> Incremental Spinup Count
radius
<string> Maximum distance at which this sound is audible.
SourceEntityName
<target_destination> If an entity is specified, sound will come from this named entity instead of the location of ambient_generic. If the target is an NPC capable of lipsynching, it will lipsynch to the sound.
Todo: Is this speech specific? Try it with a long soundeffect.

Flags

1 - Play everywhere
The sound will play as if inside the players head, not depending on distance or direction to the playing entity.
16 - Start Silent
The map will start with this sound not playing. To make a sound play from the start of the map, both this flag and the Is NOT Looped flag must be cleared.
32 - Is NOT Looped
Used for sounds that aren't looped. The sound can be repeatedly played using continuous PlaySound inputs, but can not be turned off by the StopSound input. (Multiple sounds from the same entity will not overlap eachother, meaning that the previous sound will be automatically stopped by the next sound being played.) If not checked, a StopSound input is instead required to reset the sound before it can be played with another PlaySound input. This flag concerns PlaySound inputs only. Volume inputs are not affected.

Inputs

Pitch <integer>
Sets the sound pitch, expressed as a range from 1 to 255, where 100 is the sound's default pitch.
PlaySound
Starts the sound (if a looped sound isn't already playing). Also registers a sound as playing for the StopSound input.
StopSound
Stops the sound if it is looped, is playing, and has been registered as playing through the PlaySound input.
ToggleSound
Toggles the sound between playing and stopping.
Volume <integer>
Plays the sound at the sound volume given, expressed as a range from 0 to 10, where 10 is the loudest. It will play the sound as a PlaySound input would, but will not register that the sound is playing, meaning that looped sounds started entirely through this input will not be able to be stopped with the StopSound input, and it will not be affected by the Is NOT Looped flag being unchecked. It is currently speculated that an unplayed sound being able to be played using only the Volume input, is a bug.
Template:Ep1 add
Fades the sound up to full volume over a specified number of seconds, with a range from 0 to 100 seconds.
Template:Ep1 add
Fades the sound to silence over a specified number of seconds, with a range from 0 to 100 seconds.

Outputs

See Also