Env soundscape triggerable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-returned the page on original place and made it clear it's needed for trigger_soundscape)
Tag: Removed redirect
(-added class hierarchy)
Line 1: Line 1:
{{lang|Env soundscape triggerable}}
{{lang|Env soundscape triggerable}}
{{CD|CEnvSoundscapeTriggerable|file1=soundscape.cpp}}
[[File:env_soundscape.png|left]]{{base point|env_soundscape_triggerable}} This entity is required when you want to use {{ent|trigger_soundscape}} otherwise works just like {{ent|env_soundscape}}.
[[File:env_soundscape.png|left]]{{base point|env_soundscape_triggerable}} This entity is required when you want to use {{ent|trigger_soundscape}} otherwise works just like {{ent|env_soundscape}}.



Revision as of 10:19, 9 May 2023

English (en)Translate (Translate)
C++ Class hierarchy
CEnvSoundscapeTriggerable
CEnvSoundscape
CServerOnlyEntity
CBaseEntity
C++ soundscape.cpp
Env soundscape.png

Template:Base point This entity is required when you want to use trigger_soundscape otherwise works just like env_soundscape.

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.
C++ In code, it is represented by theCEnvSoundscapeTriggerableclass, defined in thesoundscape.cppfile.

Keyvalues

Radius (radius) <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) <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) 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).
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

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