Env soundscape: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Removing russian tutorial video section, it's already on the RU version of the article (and should really be titled "See also"))
(updates)
Line 1: Line 1:
{{otherlang2
{{lang|Env soundscape}}
| ru=env_soundscape:ru
{{base_point|env_soundscape|sprite=1}} It changes the active [[soundscape]] of players, and defines where positioned sounds within it play from. A player must be within the entity's radius and be able to see it for the change to take place. The entity's soundscape will then play until another one takes over. If more than one soundscape entity is fighting for control, the nearest wins.
}}


{{PreservedEnt}}


{{tip|In some games such as TF2, soundscape entities cannot be "seen" through water, in which case a [[env_soundscape_triggerable|triggerable]] soundscape is a useful workaround.}}


{{base_point|env_soundscape|sprite=1}} It changes the active [[soundscape]] of players, and defines where positioned sounds within it play from.
{{code class|CEnvSoundscape|soundscape.cpp}}


A player must be within the entity's radius and be able to see it for the change to take place. The entity's soundscape will then play until another one takes over. If more than one soundscape entity is fighting for control, the nearest wins.
==Keyvalues==
 
{{KV|Radius (radius)|int|Defines the entity's sphere of influence. Players must also have [[LOS]] to the entity for it to trigger. -1 means infinite range.}}
'''env_soundscape_triggerable''' is a related entity identical to env_soundscape, but for use in conjunction with the brush entity [[trigger_soundscape]].
{{KV|Soundscape (soundscape)|string|The name of the soundscape to play. Some examples are provided, but the actual list is not. The best way to browse soundscapes is from within the game with the <code>playsoundscape</code> console command.}}
 
{{KV|Sound Position 0 (position0)|to=Sound Position 7 (position7)|targetname|Entities which define the location from which any positioned sounds play. Must be entities that the [[client]] knows about (e.g {{ent|info_target}} or anything visible).}}
{{tip|In some mods such as TF2, soundscapes cannot be "seen" through water, in which case a triggerable soundscape is a useful workaround.}}
 
== See also ==
 
* [[Soundscapes]]
* [[env_soundscape_proxy]]
* {{Soundscape lists}}
* [[ambient_generic]]
 
== Keyvalues ==
 
{{KV|Radius|int|Defines the entity's sphere of influence. Players must also be able to see the entity for it to trigger. -1 means infinite range.}}
{{KV|Soundscape|string|The name of the soundscape to play. Some examples are provided, but the actual list is not. The best way to browse soundscapes is from within the game with the <code>playsoundscape</code> console command.}}
{{KV|Sound Position 0-7|targetname|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).}}
{{KV Parentname with warning}}
{{KV EnableDisable}}
{{KV EnableDisable}}
{{KV Targetname}}
{{KV BaseEntity}}
 
== Inputs ==


{{IO|Enabled, Disabled|Enable/disable the soundscape. Duplicated inputs!}}
==Inputs==
{{IO|ToggleEnabled|Toggle the soundscape on/off.}}
{{IO|ToggleEnabled|Toggle the soundscape on/off.}}
{{ScrollBox|
{{I EnableDisable}}
{{I EnableDisable}}
{{I Parentname}}
{{I BaseEntity}}
{{I Targetname}}
}}


== Outputs ==
==Outputs==
{{IO|OnPlay|Fired when this soundscape becomes the active one.}}
{{O BaseEntity|l4d=1}}


{{IO|OnPlay|Fired when this soundscape becomes the active one.}}
==See Also==
{{O Targetname}}
*{{ent|env_soundscape_proxy}}
*[[Soundscape lists]]


[[Category:Sound System]]
[[Category:Sound System]]

Revision as of 20:37, 1 October 2018

English (en)Hrvatski (hr)Русский (ru)中文 (zh)Translate (Translate)

Template:Base point It changes the active soundscape of players, and defines where positioned sounds within it play from. A player must be within the entity's radius and be able to see it for the change to take place. The entity's soundscape will then play until another one takes over. If more than one soundscape entity is fighting for control, the nearest wins.

Icon-Important.pngImportant:This is a preserved entity in Counter-Strike: SourceHalf-Life 2: DeathmatchDay of Defeat: SourceTeam Fortress 2Left 4 DeadLeft 4 Dead 2Portal 2Counter-Strike: Global Offensive.
If the game has round restart mechanics this entity may not behave as expected:
More info
  • On a new round entities with this classname will intentionally not reset. You can use logic_auto to emulate resetting it.
  • Killing it removes it forever, as it is not respawned on a new round.
  • It cannot be spawned with a point_template.
  • Parenting this with non-preserved entities may have undesirable effects.
Tip.pngTip:In some games such as TF2, soundscape entities cannot be "seen" through water, in which case a triggerable soundscape is a useful workaround.
C++ In code, it is represented by theCEnvSoundscapeclass, defined in thesoundscape.cppfile.

Keyvalues

Radius (radius) ([todo internal name (i)]) <integer>
Defines the entity's sphere of influence. Players must also have LOS to the entity for it to trigger. -1 means infinite range.
Soundscape (soundscape) ([todo internal name (i)]) <string>
The name of the soundscape to play. Some examples are provided, but the actual list is not. The best way to browse soundscapes is from within the game with the playsoundscape console command.
Sound Position 0 (position0) ([todo internal name (i)]) to Sound Position 7 (position7) <targetname>
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 dormant until activated (with theEnableinput).


Inputs

ToggleEnabled
Toggle the soundscape on/off.

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.


Outputs

OnPlay
Fired when this soundscape becomes the active one.


See Also