CAI_PlayerAlly
Jump to navigation
Jump to search
Code classes:
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/Command | Parameters or default value | Parameter Type | Effect |
---|---|---|---|
sk_ally_regen_time | 0.3003 | Seconds | How long it takes allies to regain one point of health. |
sv_npc_talker_maxdist | 1024 | World units | NPCs this far away from the player will not attempt to speak. Does not apply in multiplayer games. |
ai_no_talk_delay | 0 | 0 disables, 1 enables | To do: Effect description. |
rr_debug_qa | 0 | 0 disables, 1 enables | To do: Effect description. |
npc_ally_deathmessage | 1 | 0 disables, 1 enables | To 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.