Env speaker: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
No edit summary
Line 1: Line 1:
{{wrongtitle|title=env_speaker}}
{{hl2 point|env_speaker}} It randomly emits announcements using the [[response rules]] system.


== Entity description ==
== Keyvalues ==
[[Image:ambient_generic.png|left]]
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 ==
{{KV|Min, Max Delay Between Announcements|float|Two KVs which define the frequency range of announcements in seconds.}}
* {{KV Targetname}}
{{KV|Context rule script|string|The response rules script file to load.}}
* {{KV ResponseContext}}
{{KV|Concept name|string|The [[Response rules#Concepts|concept]] to speak.}}
* '''delaymin'''
{{KV ResponseContext}}
: <string> Minimum Delay Between Announcements
{{KV Targetname}}
* '''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 ==
== Flags ==
* Start Silent : 0
 
* Play Everywhere : 0
* Start Silent
* Play Everywhere


== Inputs ==
== Inputs ==
* {{I Targetname}}
 
* {{I ResponseContext}}
{{IO|TurnOn, TurnOff|Start/stop random announcements.}}
* '''TurnOn'''
{{IO|Toggle|Toggle random announcements on or off.}}
: Turn on the random announcements.
{{I ResponseContext}}
* '''TurnOff'''
{{I Targetname}}
: Turn off the random announcements.
* '''Toggle'''
: Toggle the random announcements off and on.


== Outputs ==
== Outputs ==
* {{O Targetname}}
 
{{O Targetname}}


[[Category:Sound System]]
[[Category:Sound System]]
[[Category:Entities]]

Revision as of 03:54, 28 May 2011

Template:Hl2 point It randomly emits announcements using the response rules system.

Keyvalues

Min, Max Delay Between Announcements ([todo internal name (i)]) <float>
Two KVs which define the frequency range of announcements in seconds.
Context rule script ([todo internal name (i)]) <string>
The response rules script file to load.
Concept name ([todo internal name (i)]) <string>
The concept to speak.
ResponseContext:
Response Contexts (ResponseContext) <string>
Pre-defined response system context{s} for this entity. Format is key:value,key:value,... When this entity speaks, the list of keys & values will be passed to the response rules system.
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

  • Start Silent
  • Play Everywhere

Inputs

TurnOn, TurnOff
Start/stop random announcements.
Toggle
Toggle random announcements on or off.
ResponseContext:
AddContext <stringRedirectInput/string>
Adds to the entity's list of response contexts. Format is <key>:<value>.
RemoveContext <stringRedirectInput/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.


Outputs