This article's documentation is for anything that uses the Source engine. Click here for more information.

Trigger soundscape: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
[[File:Toolstrigger.gif|left]]
[[File:Toolstrigger.gif|left]]
{{this is a|brush entity|name=trigger_soundscape}} It automatically triggers an {{ent|env_soundscape_triggerable}} whenever a player is inside its volume and not triggering any other soundscape entities. Something to take into consideration is that <code>env_soundscape_triggerable</code> will still act like regular env_soundscape which means it can be activated when getting into its line of sight and specified radius, so it should be placed somewhere out of reach of the player if this behavior is undesired.
{{this is a|brush entity|name=trigger_soundscape}} It automatically triggers an {{ent|env_soundscape_triggerable}} whenever a player is inside its volume and not triggering any other soundscape entities. Something to take into consideration is that <code>env_soundscape_triggerable</code> will still act like regular env_soundscape which means it can be activated when getting into its line of sight and specified radius, so it should be placed somewhere out of reach of the player if this behavior is undesired.
{{PreservedEnt|trigger_soundscape}}
{{PreservedEnt|trigger_soundscape}}


Line 9: Line 11:
:{{Confusion|Not to be confused with the actual soundscape that the <tt>env_soundscape_triggerable</tt> then plays.}}}}
:{{Confusion|Not to be confused with the actual soundscape that the <tt>env_soundscape_triggerable</tt> then plays.}}}}
{{KV|StartDisabled|intn=StartDisabled|boolean|If true starts disabled}}
{{KV|StartDisabled|intn=StartDisabled|boolean|If true starts disabled}}
{{Warning|Doesn't use filters or flags to determine whether the soundscape should be activated or not. }}
{{Warning|Doesn't use filters or flags to determine whether the soundscape should be activated or not. }}


== Inputs ==
== Inputs ==
{{I|Enable / Disable / Toggle|Enables, disables or toggles the trigger. Act of disabling it doesn't end the soundscape if it's already playing. (make sure to take into consideration that this is preserved entity so the effect of enabling or disabling will carry over during restart)}}
{{I|Enable / Disable / Toggle|Enables, disables or toggles the trigger. Act of disabling it doesn't end the soundscape if it's already playing.  
:{{important|Make sure to take into consideration that this is preserved entity so the effect of enabling or disabling will carry over during restart}}}}
 


{{note|As this entity is derived from CBaseTrigger it has [[CBaseTrigger|regular trigger properties]] available. Filters and flags work on outputs but because this is a preserved entity and the filters are not, the filter will be lost upon round restart and not set up again so it's not advised to be used for those purposes as regular triggers are available.}}
{{note|As this entity is derived from CBaseTrigger it has [[CBaseTrigger|regular trigger properties]] available. Filters and flags work on outputs but because this is a preserved entity and the filters are not, the filter will be lost upon round restart and not set up again so it's not advised to be used for those purposes as regular triggers are available.}}

Revision as of 16:27, 1 October 2024

English (en)Translate (Translate)
C++ Class hierarchy
CTriggerSoundscape
CBaseTrigger
CBaseToggle
CBaseEntity
C++ soundscape.cpp
Toolstrigger.gif

trigger_soundscape is a brush entity available in all Source Source games. It automatically triggers an env_soundscape_triggerable whenever a player is inside its volume and not triggering any other soundscape entities. Something to take into consideration is that env_soundscape_triggerable will still act like regular env_soundscape which means it can be activated when getting into its line of sight and specified radius, so it should be placed somewhere out of reach of the player if this behavior is undesired.


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.

Keyvalues

Soundscape (soundscape) <targetname>
Targetname of the env_soundscape_triggerable that this brush triggers.
Warning.pngRisk of Confusion:Not to be confused with the actual soundscape that the env_soundscape_triggerable then plays.
StartDisabled (StartDisabled) <boolean>
If true starts disabled


Warning.pngWarning:Doesn't use filters or flags to determine whether the soundscape should be activated or not.

Inputs

Enable / Disable / Toggle
Enables, disables or toggles the trigger. Act of disabling it doesn't end the soundscape if it's already playing.
Icon-Important.pngImportant:Make sure to take into consideration that this is preserved entity so the effect of enabling or disabling will carry over during restart


Note.pngNote:As this entity is derived from CBaseTrigger it has regular trigger properties available. Filters and flags work on outputs but because this is a preserved entity and the filters are not, the filter will be lost upon round restart and not set up again so it's not advised to be used for those purposes as regular triggers are available.

See also