Env microphone

From Valve Developer Community

This point-based entity is available in all Source games.

Table of contents

Entity description

Broadcasts sound from a location for either playback or monitoring.

See Also

  • HL2 Digital Sound (http://type3studios.com/civilization/tutorial_render/sdknuts/Sound2_wiseSoundCast)

Keyvalues

Defines the name that other entities refer to this entity by.
  • hammerid [Episode Two Update]
<integer readonly> This id is used for debugging purposes in Hammer.
Specifies the targetname of this entity's Parent in a movement hierarchy. Child entities move with their Parent.
  • StartDisabled
<boolean>
  • target
<target_destination> If the speaker is in Measuring mode, this is the name of the entity where the sound level is to be measured.
  • SpeakerName
<target_destination> The name of a speaker entity through which to play any sounds heard by this microphone. If specified, the microphone will consider itself in Speaker mode. Cannot be an env_speaker!
  • ListenFilter
<filterclass> The name of an filter entity which specifies the only entities the microphone can hear. Sounds emitted by other entities will not be heard.
  • speaker_dsp_preset
<choices> Only useful in Speaker mode. If specified, when the microphone is enabled, it'll set the global dsp_speaker preset to this value. Sounds played back through speakers will then be affected by the selected DSP.
Literal Value Description
0 Use Default
50 1 NO EFFECT
51 2 (DUPLICATE OF 1)
52 3 (DUPLICATE OF 1)
53 4 (DUPLICATE OF 1)
54 5 (DUPLICATE OF 1)
55 6 SPEAKER, LOUDER
56 7 SPEAKER VERY SMALL
57 8 LOUDSPEAKER, ECHO
58 9 SPEAKER SMALL
59 10 SPEAKER TINY
  • Sensitivity
<float> (0-10) If the speaker is being used to monitor sound levels, this keyvalue dictates its sensitivity.
Literal Value Description
0 Deaf
1 Normal
2-10 Increasing Sensitivity
  • MaxRange
<float> (0-∞) Sounds beyond this range won't be heard, irrelevant of attenuation.
Warning.png Warning: setting this to zero (or a value > 1024) when the microphone is in Speaker mode can be very bad for performance!!

Inputs

  • Kill
Removes this entity from the world.
Removes this entity and all its children from the world.
  • AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
Changes the entity's parent in the movement hierarchy.
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the Parent's Origin and Angles at the time it is attached.
Removes this entity from its current movement hierarchy.
  • Enable
Enable this entity.
  • Disable
Disable this entity.
  • SetSpeakerName <target_destination>
Set the microphone to output through a different speaker entity.

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
!activator = activator
  • SoundLevel <float>
Fired in Measuring mode whenever the sound level changes.
  • OnRoutedSound
Fired whenever a sound is routed out through the specified speaker (if any).
  • OnHeardSound
Fired whenever this microphone hears any sound it cares about.