CEnvSoundscape
Jump to navigation
Jump to search
Code classes:
CEnvSoundscape
CPointEntity
CBaseEntity
(all ents)
CEnvSoundscape
is a code class in all Source games. These entities play soundscapes.
Classnames:
env_soundscape
- Makes the player hear a certain soundscape when they're able to see the entity. If multipleenv_soundscape
s are visible, the closest wins.
Bug: In some games (one being ), soundscape entities cannot be "seen" through water, in which case a triggerable soundscape is a useful workaround. Tested in: To do: All others
ConVars/Commands[edit | edit source]
ConVar/Command | Parameters or default value | Parameter Type | Effect |
---|---|---|---|
soundscape_debug | 0 | 0 disables, 1 enables | Shows which soundscape entities are trying to play. Soundscapes with positional sounds will also have those spots indicated. To do: Describe the line colors accurately. |
Keyvalues[edit | edit source]
- Radius
(radius)
<int>
- Defines the entity's sphere of influence. -1 means infinite range.
- Soundscape
(soundscape)
<string>
- The name of the soundscape to play. Some examples are provided, but the entire list is not. Corresponds to an entry in the
soundscapes*.txt
file in the /scripts/ directory. The best way to browse soundscapes is from within the game with theplaysoundscape
console command. - Sound Position 0
(position0)
to Sound Position 7(position7)
<target_destination>
- Entities which define the location from which any positioned sounds play. Must be entities that the client knows about (e.g
info_target
or anything visible).
- Start Disabled
(StartDisabled)
<boolean>
- Stay inactive until Enabled.
Inputs[edit | edit source]
- ToggleEnabled
- Toggle the soundscape on/off. When off, the soundscape will never play from this entity.
- Enable
- Makes the entity active.
- Disable
- Makes the entity inactive.
Outputs[edit | edit source]
- OnPlay
- Fired when this soundscape becomes the active one.