Player Companion
A player companion helps the player through the majority of the game. Examples include NPCs npc_alyx and npc_barney. Distinguished from a Player Ally who is a generic expendable character (such as a rebel) and assists the player only briefly.
In some games a Player Companion is invincible; they may be knocked down or play pain animations but cannot actually die. In other cases the Companion has signifiantly more health than normal, but can still die, resulting in a game over.
Setting an NPC as vital/essential can be done several ways.
Keyvalues
This NPC will cause the game to end if killed.
- Is this a vital ally? (GameEndAlly) <boolean> (in all games since Half-Life 2: Episode One)
Inputs
Determines whether the game should end if this character dies.
- MakeGameEndAlly (in all games since Half-Life 2: Episode One)
- MakeRegularAlly (in all games since Half-Life 2: Episode One)