CAI_PlayerAlly

From Source Entities
Jump to navigation Jump to search

CAI_PlayerAlly is a code class inherited by NPCs that are especially important to the player. Usually when a CAI_PlayerAlly dies, the game must be restarted. These entities recover health slowly and have access to some special speech commands.

To do: Find out more about the Q&A system!

ConVars/Commands[edit | edit source]

ConVar/CommandParameters or default valueParameter TypeEffect
sk_ally_regen_time0.3003SecondsHow long it takes allies to regain one point of health.
sv_npc_talker_maxdist1024World unitsNPCs this far away from the player will not attempt to speak. Does not apply in multiplayer games.
ai_no_talk_delay00 disables, 1 enablesTo do: Effect description.
rr_debug_qa00 disables, 1 enablesTo do: Effect description.
npc_ally_deathmessage10 disables, 1 enablesTo do: Effect description.

Keyvalues[edit | edit source]

Is this a vital ally? (GameEndAlly) <boolean>
Makes the NPC "vital" - if they die, the game will restart from the last save.

Inputs[edit | edit source]

IdleRespond (Not in FGD)
Does nothing.
SpeakResponseConcept <string>
Speak the specified response concept. To do: Example parameter.
MakeGameEndAlly
Sets Is this a vital ally? to Yes.
MakeRegularAlly
Sets Is this a vital ally? to No.
AnswerQuestion (Not in FGD) <integer>
To do: Description.
AnswerQuestionHello (Not in FGD) <integer>
To do: Description.
EnableSpeakWhileScripting
Allow this NPC to speak (dynamic) responses even if normal AI is suspended by a scripted sequence.
DisableSpeakWhileScripting
If EnableSpeakWhileScripting allowed it, cancel this NPC's ability to speak (dynamic) responses when normal AI is suspended by a scripted sequence.