ai_speechfilter
Jump to navigation
Jump to search
Code classes:
CAI_SpeechFilter
CBaseEntity
(all ents)
ai_speechfilter
is a point entity present in all games except the Left 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
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 iskey: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.