CAI PlayerAlly: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{CD|CAI_PlayerAlly|file1=1}} ==Keyvalues== {{KV|GameEndAlly|intn=0|bool|This NPC will cause the game to end if killed.|since={{hl2ep1}}}} ==Inputs== {{I|IdleRespond|nofgd=1...")
 
mNo edit summary
Line 11: Line 11:
{{I|SpeakResponseConcept|Speak the specified [[Response System|response concept]] immediately.|param=string}}
{{I|SpeakResponseConcept|Speak the specified [[Response System|response concept]] immediately.|param=string}}
{{I|MakeGameEndAlly|If set, game ends if this character dies.}}
{{I|MakeGameEndAlly|If set, game ends if this character dies.}}
{{I|MakeRegularAlly|If set, games does not end if this character dies.}}
{{I|MakeRegularAlly|If set, game does not end if this character dies.}}
{{I|AnswerQuestion|nofgd=1|param=int}}
{{I|AnswerQuestion|nofgd=1|param=int}}
{{I|AnswerQuestionHello|nofgd=1|param=int}}
{{I|AnswerQuestionHello|nofgd=1|param=int}}

Revision as of 02:45, 29 September 2024

C++ Class hierarchy
CAI_PlayerAlly
CAI_BaseActor
CAI_ExpresserHost
CAI_BaseHumanoid
CAI_BaseHumanoidBase
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ ai_playerally.cpp

Keyvalues

GameEndAlly <boolean> (in all games since Half-Life 2: Episode One)
This NPC will cause the game to end if killed.

Inputs

IdleRespond  !FGD
EnableSpeakWhileScripting
Allow this NPC to speak responses while in a scripted sequence or while StartScripting is active.
DisableSpeakWhileScripting
Cancels this NPC's ability to speak responses while in a scripted sequence or while StartScripting is active if it was previously enabled by EnableSpeakWhileScripting.

Since Half-Life 2: Episode One Half-Life 2: Episode One

SpeakResponseConcept <stringRedirectInput/string>
Speak the specified response concept immediately.
MakeGameEndAlly
If set, game ends if this character dies.
MakeRegularAlly
If set, game does not end if this character dies.
AnswerQuestion <integerRedirectInput/integer> !FGD
AnswerQuestionHello <integerRedirectInput/integer> !FGD