ai_speechfilter

From Valve Developer Community

Jump to: navigation, search

This is a point entity available in all Source games.

Contents

Entity description

An entity that can be used to control the idle speech patterns of a set of NPCs. Speech patterns for NPCs are defined in Response System.

Keyvalues

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.
  • 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.
  • subject
<target_destination> This is the subject(s) whose speech to filtering. May be a targetname or a classname.
  • IdleModifier
<float> Multiplier to the percentage chance that subject(s) will idle speak. Set to 0 to prevent all idle speech.
  • NeverSayHello
<boolean> If set to Yes, subject(s) won't greet the player on first encounter.
  • StartDisabled
<boolean>

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>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
  • 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.
  • Enable
Enable this entity.
  • Disable
Disable this entity.
  • SetIdleModifier <float>
Allows designers to change the idle modifier at runtime.

Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
Personal tools