env_soundscape_triggerable

From Valve Developer Community

Jump to: navigation, search

This is a point entity available in all Source games. In code it is represented by class CEnvSoundscapeTriggerable, defined in soundscape.cpp.

Contents

Entity Description

A point entity that works like the env_soundscape entity except that it works in conjunction with the trigger_soundscape entity to determine when a player hears it. In some mods such as TF2, soundscapes cannot be "seen" through water, in which case a triggerable soundscape is useful workaround.
Note:This entity has the same keyvalues, (non-existant) flags, inputs, and outputs as env_soundscape.




Keyvalues

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.
  • Parentname:

Parent <targetname>
Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
Warning:See the warning under Counter-Strike Round Restarts before using the Parent field in CS:S.
  • EnableDisable:

Start Disabled <bool>
Stay dormant until activated (probably with the Enable input).
  • radius
<integer> Radius - If set to -1, then the player can hear the soundscape as long as he can see it (regardless of distance to it).
  • soundscape
<string> Soundscape - The name of the soundscape to use. Corresponds to an entry in the soundscapes_*.txt file in the hl2/scripts directory (normally packed into the source engine.gcf file).
Literal Value Description
Nothing Nothing
Automatic Automatic
Automatic_Dialog Automatic (dialog)
GenericIndoor Indoor
GenericOutdoor Outdoor
  • position0-7
<target_destination> Sound Position 0-7 - Sound positions that will be referenced inside the soundscape text file. Usually used to position a set of sounds within the world.

Inputs

  • Targetname:

Kill
Removes this entity from the world.
KillHierarchy
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 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
  • Parentname:

SetParent <targetname>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from its current movement hierarchy.
  • EnableDisable:

Enable
Disable
Enable/disable this entity from performing its task. It might also disappear from view.
  • Disabled
To do: Write description. (It's not a typo - both Disable and Disabled exists.)
  • ToggleEnabled
Toggle the soundscape enabled state.

Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
  • OnPlay
Fired when this soundscape becomes the active one.
Personal tools