Env speaker: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 4: Line 4:


==Keyvalues==
==Keyvalues==
* '''name'''
* {{kv targetname}}
:targetname <target_source> The name that other entities refer to this entity by.
* {{kv responsecontext}}
* '''Response Contexts'''
* '''delaymin'''
:ResponseContext <string> Response system context(s) for this entity. Format should be: 'key:value,key2:value2,etc'. When this entity speaks, the list of keys & values will be passed to the response rules system.
: <string> Minimum Delay Between Announcements
* '''Min Delay Between Announcements'''
* '''delaymax'''
:delaymin <string>
: <string> Maximum Delay Between Announcements
* '''Max Delay Between Announcements'''
* '''rulescript'''
:delaymax <string>
: <string> Script file containing rules for playing appropriate sounds.
* '''spawnflags'''
* '''Concept'''
:spawnflags <flags>
: <string> High level concept name used as primary search key.
* '''Context rule script'''
==Flags==
:rulescript <string> Script file containing rules for playing appropriate sounds.
* Start Silent : 0
*'''Concept name'''
* Play Everywhere : 0
:concept <string> High level concept name used as primary search key.
 
==Inputs==
==Inputs==
*'''Kill'''
* {{i targetname}}
:Removes this entity from the world.
* {{i responsecontext}}
*'''KillHierarchy'''
* '''TurnOn'''
:Removes this entity and all its children from the world.
: Turn on the random announcements.
*'''AddOutput'''
* '''TurnOff'''
:<string> Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
: Turn off the random announcements.
*'''FireUser1'''
* '''Toggle'''
:Causes this entity's OnUser1 output to be fired.
: Toggle the random announcements off and on.
*'''FireUser2'''
:Causes this entity's OnUser2 output to be fired.
*'''FireUser3'''
:Causes this entity's OnUser3 output to be fired.
*'''FireUser4'''
:Causes this entity's OnUser4 output to be fired.
*'''AddContext'''
:<string> Adds a context to this entity's list of response contexts. The format should be 'key:value'.
*'''RemoveContext'''
"<string> Remove a context from this entity's list of response contexts. The name should match the 'key' of a previously added context.
*'''ClearContext'''
: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==
==Outputs==
*'''OnUser1'''
* {{o targetname}}
:Fired in response to FireUser1 input.
 
*'''OnUser2'''
:Fired in response to FireUser2 input.
 
*'''OnUser3'''
:Fired in response to FireUser3 input.
 
*'''OnUser4'''
:Fired in response to FireUser4 input.




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

Revision as of 00:17, 15 August 2005

Template:Wrongtitle

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 a NPC, a sentense, or just a sound. See Response System for more information about context rule script grammer.

Keyvalues

<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

Turn on the random announcements.
  • TurnOff
Turn off the random announcements.
  • Toggle
Toggle the random announcements off and on.

Outputs