CNPC PlayerCompanion: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
Since 
Since 
		
	
| Gameplayer (talk | contribs)  (Created page with "{{CD|CNPC_PlayerCompanion|base=CAI_PlayerAlly|file1=[https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/hl2/npc_playercompanion.cpp npc_playercomp...") | m (Substituted IO templates) | ||
| Line 8: | Line 8: | ||
| ===Inputs=== | ===Inputs=== | ||
| {{ | {{I|OutsideTransition|Use this input to teleport the NPC to a [[hint node]] with the "Player Squad Transition Point" hint type.}} | ||
| {{ | {{I|EnableAlwaysTransition}} | ||
| {{ | {{I|DisableAlwaysTransition|If enabled, this NPC will always teleport to a Player Squad Transition Point even if they're not within the {{ent|trigger_transition}}.}} | ||
| {{ | {{I|EnableWeaponPickup}} | ||
| {{ | {{I|DisableWeaponPickup|Enables/disables weapon pickup.}} | ||
| {{ | {{I|GiveWeapon|param=classname|Gives the NPC a weapon immediately.}} | ||
| {{ | {{I|LockReadiness|Lock readiness at current setting for x seconds -1 {{=}} forever, 0 {{=}} unlock now|param=float}} | ||
| {{ | {{I|SetReadinessLow|Set readiness to calmest state (Bored)}} | ||
| {{ | {{I|SetReadinessMedium|Set readiness to moderate (Alert)}} | ||
| {{ | {{I|SetReadinessHigh|Set readiness to highest. (Combat imminent)}} | ||
| {{ | {{I|SetReadinessPanic|Set readiness to panic state (Special)}} | ||
| ====Since {{hl2ep1|4}}==== | ====Since {{hl2ep1|4}}==== | ||
| {{ | {{I|EnterVehicle|param=targetname|Make NPC enter the vehicle specified by name.}} | ||
| {{ | {{I|EnterVehicleImmediately|param=string|Make NPC immediatelly enter the specified vehicle without playing animations.}} | ||
| {{ | {{I|ExitVehicle|Make NPC exit the vehicle.}} | ||
| {{ | {{I|CancelEnterVehicle}} | ||
| {{ | {{I|ClearAllOutputs|Clears every output that this NPC has.}} | ||
| ===Output=== | ===Output=== | ||
| {{O|OnWeaponPickup|Fired when NPC picks up a weapon.}} | {{O|OnWeaponPickup|Fired when NPC picks up a weapon.}} | ||
Latest revision as of 08:49, 21 April 2025
|  Class hierarchy | 
|---|
| CNPC_PlayerCompanion | 
|  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.