CNPC PlayerCompanion

From Valve Developer Community
Jump to: navigation, search
Class hierarchy
CNPC_PlayerCompanion
CAI_PlayerAlly
CAI BaseActor
CAI_ExpresserHost
CAI_BaseHumanoid
CAI_BaseHumanoidBase
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
npc_playercompanion.cpp

Descriptions of in-game accessible Keyvalues / Inputs / Outputs

Keyvalues

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

AlwaysTransition <boolean>
This NPC will always teleport to a Player Squad Transition Point if they're not within the trigger_transition.
DontPickupWeapons <boolean>
This NPC will NOT be allowed to pick up weapons they find on the ground.

Inputs

OutsideTransition
Use this input to teleport the NPC to a hint node with the "Player Squad Transition Point" hint type.
EnableAlwaysTransition
DisableAlwaysTransition
If enabled, this NPC will always teleport to a Player Squad Transition Point even if they're not within the trigger_transition.
EnableWeaponPickup
DisableWeaponPickup
Enables/disables weapon pickup.
GiveWeapon <classname>
Gives the NPC a weapon immediately.
LockReadiness <float>
Lock readiness at current setting for x seconds -1 = forever, 0 = unlock now
SetReadinessLow
Set readiness to calmest state (Bored)
SetReadinessMedium
Set readiness to moderate (Alert)
SetReadinessHigh
Set readiness to highest. (Combat imminent)
SetReadinessPanic
Set readiness to panic state (Special)

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

EnterVehicle <targetname>
Make NPC enter the vehicle specified by name.
EnterVehicleImmediately <string>
Make NPC immediatelly enter the specified vehicle without playing animations.
ExitVehicle
Make NPC exit the vehicle.
CancelEnterVehicle
ClearAllOutputs
Clears every output that this NPC has.

Output

OnWeaponPickup
Fired when NPC picks up a weapon.