Env speaker

From Valve Developer Community

Table of 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

Defines the name that other entities refer to this entity by.
  • hammerid [Episode Two Update]
<integer readonly> This id is used for debugging purposes in Hammer.
<string> Response system context(s) for this entity. Format should be: 'key:value,key2:value2,etc'. When this entity speaks, the list of keys and values will be passed to the response rules system.
  • 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

  • Kill
Removes this entity from the world.
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 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
Adds a context to this entity's list of response contexts. The format should be 'key:value'.
Remove a context from this entity's list of response contexts. The name should match the 'key' of a previously added context.
Removes all contexts in this entity's list of response contexts.
  • TurnOn
Turn on the random announcements.
  • TurnOff
Turn off the random announcements.
  • Toggle
Toggle the random announcements off and on.

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
!activator = activator