ai_speechfilter

From Source Entities
Jump to navigation Jump to search

Code classes:

ai_speechfilter is a point entity present in all games except the L4d.pngL4d2-small.pngLeft 4 Dead games. The entity allows to adjust how much an NPC will idle chatter to other NPCs or the player. This is quite useful, especially if you have a script setup where idle chatter will seem out of place, or get in the way of a Face Poser scene. Speech patterns for NPCs are defined in Response System. Most of this entity's code is ifdef'd out of Css.png for no clear reason.

Keyvalues[edit | edit source]

Subject(s) (subject) <target_name_or_class>
This is the NPC(s) whose speech we're filtering. May be a targetname or a classname.
Idle modifier (IdleModifier) <float>
Multiplier to the probability that our NPC(s) will idle speak. Set to 0 to prevent all idle speech.
Greet Player? (NeverSayHello) <boolean>
Should the NPC(s) greet the player when they first spot them?
  • 0: Yes
  • 1: No
Note: The description for this in Valve's FGDs is completely wrong according to every piece of code.
Response Contexts (ResponseContext) <string>
Pre-defined response system contexts for this entity. May be filtered with filter_activator_context. Format is key:value,key:value,....
Start Disabled (StartDisabled) <boolean>
Stay inactive until Enabled.

Inputs[edit | edit source]

SetIdleModifier <float>
Sets Idle Modifier.
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.
Enable
Makes the entity active.
Disable
Makes the entity inactive.