Template:I CAI BaseNPC

From Valve Developer Community
Jump to: navigation, search

This template is our holder for all inputs assigned through CAI_BaseNPC.

Add |rappel=1 to display the BeginRappel input.


SetRelationship <string>
<string|targetname or classname> <string|disposition> <int|rank>
Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
SetEnemyFilter <targetname>
Set a filter by which to filter potential enemies.
SetHealth <integer>
Set the health of the NPC to this amount.
Tells NPC to begin rappelling.
SetSquad <string>
Changes the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
Wakes up the NPC if it is sleeping.[Clarify]
UpdateEnemyMemory <targetname> (in all games since Half-Life 2: Episode One)
Update (or create) this NPC's memory of of the given entity.
ForgetEntity <targetname>
Clears out the NPC's knowledge of a named entity.
IgnoreDangerSounds <float>
Ignore danger sounds for the specified number of seconds. To do: Clarify what a "danger sound" is.
Makes the NPC die and disappear.
Puts the NPC into a "scripted" state. It will ignore a variety of stimuli, such as +use, danger sounds, and idle speech.
Puts the NPC into their normal state again.
Prevents the NPC from making any vocalized sounds or speech, unless they are in a choreographed scene.
Allow the NPC to make vocalizations again.
InsideTransition  !FGD
Tells the NPC to stop any choreography (but not scripted speech) its a part of. Usually this is only done by a trigger_changelevel when a player steps inside it, and the NPC is inside an associated trigger_transition.
ActivateSpeedModifier  !FGD
DisableSpeedModifier  !FGD
SetSpeedModRadius  !FGD
SetSpeedModSpeed  !FGD
Makes the NPC put their weapon away.
Makes the NPC take out their weapon, if they have one.
Makes the NPC holster their weapon and then never unholster it again.
ForceInteractionWithNPC <string> (in all games since Half-Life 2: Episode One)
Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>.