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.


AI_BaseNPC:

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.
BeginRappel
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.
Wake
Wakes up the NPC if it is sleeping.[Clarify]
UpdateEnemyMemory <targetname> (New with Half-Life 2: Episode One / Source 2006)
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.
Break
Makes the NPC die and disappear.
StartScripting
Puts the NPC into a "scripted" state. It will ignore a variety of stimuli, such as +use, danger sounds, and idle speech.
ExitScripting
Puts the NPC into their normal state again.
GagEnable
Prevents the NPC from making any vocalized sounds or speech, unless they are in a choreographed scene.
GagDisable
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
HolsterWeapon
Makes the NPC put their weapon away.
UnholsterWeapon
Makes the NPC take out their weapon, if they have one.
HolsterAndDestroyWeapon
Makes the NPC holster their weapon and then never unholster it again.
ForceInteractionWithNPC <string> (New with Half-Life 2: Episode One / Source 2006)
Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>.