env_sound

Modified

12-Jul-2023

Allows you to set up specific ambient effects for increasing the sound experience and making it consistent with the visuals of your map.

Keyvalues


OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.

Name targetname : Set name of env_sound so other entities can trigger it to apply sound effect to entities in radius- only when 'Use only' and 'Radius' are used. Every trigger use-type works uniformly. Can be kill-targeted but already applied effects persist.

Radius radius : Radius, in units, in which a player has to be for the ambient effect to change for him. The ambient effect will stay after leaving the radius, until another env_sound is entered. If set to 0, the radius won't be used, this is useful when entity is "Use only".

Room Type roomtype : Pick the ambient effect here. There are 29 options.

  • 0 : Normal (off)
  • 1 : Generic
  • 2 : Metal Small
  • 3 : Metal Medium
  • 4 : Metal Large
  • 5 : Tunnel Small
  • 6 : Tunnel Medium
  • 7 : Tunnel Large
  • 8 : Chamber Small
  • 9 : Chamber Medium
  • 10 : Chamber Large
  • 11 : Bright Small
  • 12 : Bright Medium
  • 13 : Bright Large
  • 14 : Water Small
  • 15 : Water Medium
  • 16 : Water Large
  • 17 : Concrete Small
  • 18 : Concrete Medium
  • 19 : Concrete Large
  • 20 : Big Room
  • 21 : Bigger Room
  • 22 : Biggest Room
  • 23 : Cavern Small
  • 24 : Cavern Medium
  • 25 : Cavern Large
  • 26 : Weirdo - Drugged
  • 27 : Weirdo - Dizzy
  • 28 : Weirdo - Psychotic

Flags


  • 1 : USE Only : If selected, the env_sound apply sound effect directly (if radius is 0), or will check for players inside that radius single time whenever it is triggered.

When a player spawns within the radius of an env_sound, he won't be affected.

Being in an env_sound for too short of a time won't cause its effects to be applied on the player.

An env_sound effect is not reset to normal after a map change. If you do not want to use env_sounds in your map, you should at least add a few around its start locations to properly reset the effect.