env_speaker
From Valve Developer Community
Contents |
Entity description
Announcement Speaker, used in several maps it uses the NPC response context system. You can specify time between announcements. When it makes an announcement, it looks at its Context rule script, chooses the best rule (Response Contexts and Concept name are used here.), then dispatches a response which could be a .vcd scene that controls an NPC, a sentence, or just a sound. See Response System for more information about context rule script grammar.
Keyvalues
-
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
-
ResponseContext:
- Response Contexts <string>
- Pre-defined response system contexts for this entity. Format is
key:value,key:value,...
- delaymin
- <string> Minimum Delay Between Announcements
- delaymax
- <string> Maximum Delay Between Announcements
- rulescript
- <string> Script file containing rules for playing appropriate sounds.
- Concept
- <string> High level concept name used as primary search key.
Flags
- Start Silent : 0
- Play Everywhere : 0
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> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
-
ResponseContext:
-
AddContext <string> - Adds to the entity's list of response contexts. Format is
<key>:<value>. -
RemoveContext <string> - Remove a context from this entity's list. The name should match the key of an existing context.
-
ClearContext - Removes all contexts from this entity's list.
- TurnOn
- Turn on the random announcements.
- TurnOff
- Turn off the random announcements.
- Toggle
- Toggle the random announcements off and on.
Outputs
-
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.

