Ambient generic: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(New!)
 
No edit summary
Line 6: Line 6:
Universal ambient sound. Use it to play and control a single sound.
Universal ambient sound. Use it to play and control a single sound.


==Entity Values==
==Keys==
===Keys===
* [[Targetname]]
* '''message'''
:<sound> Name of the GameSound entry for the sound to play. Also supports direct .wav filenames.
* '''health'''
:<integer> Sound volume, expressed as a range from 0 to 10, where 10 is the loudest.
* '''preset'''
:<choices> Dynamic Preset
:* None
:* Huge Machine
:* Big Machine
:* Machine
:* Slow Fade in
:* Fade in
:* Quick Fade in
:* Slow Pulse
:* Pulse
:* Quick pulse
:* Slow Oscillator
:* Oscillator
:* Quick Oscillator
:* Grunge pitch
:* Very low pitch
:* Low pitch
:* High pitch
:* Very high pitch
:* Screaming pitch
:* Oscillate spinup/down
:* Pulse spinup/down
:* Random pitch
:* Random pitch fast
:* Incremental Spinup
:* Alien
:* Bizzare
:* Planet X
:* Haunted
* '''volstart'''
: <integer> Start Volume
* '''fadein'''
: <integer> Fade in time (0-100)
* '''fadeout'''
: <integer> Fade out time (0-100)
* '''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.


* '''Name''' ''targetname <target_source>''
==Flags==
: The name that other entities refer to this entity by.
* Play everywhere
* Start Silent
* Is NOT Looped
==Inputs==


* '''Sound Name''' ''message <sound>''
* [[Targetname]]
: Name of the GameSound entry for the sound to play. Also supports direct .wav filenames.
 
* '''Volume''' ''health <integer>''
: Sound volume, expressed as a range from 0 to 10, where 10 is the loudest.
 
* '''Dynamic Presets''' ''preset <choices>''
* '''Start Volume''' ''volstart <integer>''
* '''Fade in time (0-100)''' ''fadein <integer>''
* '''Fade out time (0-100)''' ''fadeout <integer>''
* '''Pitch''' ''pitch <integer>''
: Sound pitch, expressed as a range from 1 to 255, where 100 is the sound's default pitch.
 
* '''Start Pitch''' ''pitchstart <integer>''
* '''Spin up time (0-100)''' ''spinup <integer>''
* '''Spin down time (0-100)''' ''spindown <integer>''
* '''LFO type 0)off 1)sqr 2)tri 3)rnd''' ''lfotype <integer>''
* '''LFO rate (0-1000)''' ''lforate <integer>''
* '''LFO mod pitch (0-100)''' ''lfomodpitch <integer>''
* '''LFO mod vol (0-100)''' ''lfomodvol <integer>''
* '''Incremental Spinup Count''' ''cspinup <integer>''
* '''Max Audible Distance''' ''radius <string>''
: Maximum distance at which this sound is audible.
 
* '''spawnflags''' ''spawnflags <flags>''
* '''SourceEntityName''' ''SourceEntityName <target_destination>''
: If an entity is specified, sound will come from this named entity instead of the location of ambient_generic.
 
===Inputs===
 
* '''Kill'''
: Removes this entity from the world.
 
* '''KillHierarchy'''
: Removes this entity and all its children from the world.
 
* '''AddOutput <string>'''
: Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
* '''FireUser1'''
: Causes this entity's OnUser1 output to be fired.
 
* '''FireUser2'''
: Causes this entity's OnUser2 output to be fired.
 
* '''FireUser3'''
: Causes this entity's OnUser3 output to be fired.
 
* '''FireUser4'''
: Causes this entity's OnUser4 output to be fired.


* '''Pitch <integer>'''
* '''Pitch <integer>'''
Line 78: Line 94:
: Sets the sound volume, expressed as a range from 0 to 10, where 10 is the loudest.
: Sets the sound volume, expressed as a range from 0 to 10, where 10 is the loudest.


===Outputs===
==Outputs==
 
* '''OnUser1'''
: Fired in response to FireUser1 input.
 
* '''OnUser2'''
: Fired in response to FireUser2 input.
 
* '''OnUser3'''
: Fired in response to FireUser3 input.


* '''OnUser4'''
* [[Targetname]]
: Fired in response to FireUser4 input.


==See Also==
==See Also==

Revision as of 19:24, 9 July 2005

Template:Wrongtitle

Entity Description

Entity Name: ambient_generic

Universal ambient sound. Use it to play and control a single sound.

Keys

<sound> Name of the GameSound entry for the sound to play. Also supports direct .wav filenames.
  • health
<integer> Sound volume, expressed as a range from 0 to 10, where 10 is the loudest.
  • preset
<choices> Dynamic Preset
  • None
  • Huge Machine
  • Big Machine
  • Machine
  • Slow Fade in
  • Fade in
  • Quick Fade in
  • Slow Pulse
  • Pulse
  • Quick pulse
  • Slow Oscillator
  • Oscillator
  • Quick Oscillator
  • Grunge pitch
  • Very low pitch
  • Low pitch
  • High pitch
  • Very high pitch
  • Screaming pitch
  • Oscillate spinup/down
  • Pulse spinup/down
  • Random pitch
  • Random pitch fast
  • Incremental Spinup
  • Alien
  • Bizzare
  • Planet X
  • Haunted
  • volstart
<integer> Start Volume
  • fadein
<integer> Fade in time (0-100)
  • fadeout
<integer> Fade out time (0-100)
  • 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.

Flags

  • Play everywhere
  • Start Silent
  • Is NOT Looped

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.
  • StopSound
Stops the sound if it is playing.
  • ToggleSound
Toggles the sound between playing and stopping.
  • Volume <integer>
Sets the sound volume, expressed as a range from 0 to 10, where 10 is the loudest.

Outputs

See Also