diff --git a/Base-Combat-Character.md b/Base-Combat-Character.md new file mode 100644 index 0000000..baf0f61 --- /dev/null +++ b/Base-Combat-Character.md @@ -0,0 +1,36 @@ +This page lists changes to `CBaseCombatCharacter`, which both NPCs and players derive from. This means these changes can be used with either the player or NPCs, sometimes with varying behavior. + +See [[Base NPC]] for more details on changes to NPCs in particular. + +### Inputs +--- +* **SetProficiencyOverride** `` - Overrides a character's weapon proficiency, or how accurate their shots are. -1 reverts to the character's default proficiency. +* **SetForceServerRagdoll** `` - Forces this character to turn into a serverside prop_ragdoll instead of a clientside ragdoll when it dies. +--- +* **SetBloodColor** `` - Sets a character's blood color. +* **SetRelationship** `` - Sets a character's relationship with another character. This input originally only existed on NPCs, but it's been moved here so it can be used on players as well. +--- +* **HolsterWeapon** `` - Holsters the character's current weapon. This input originally only existed on NPCs, but it's been moved here so it can be used on players as well. +* **HolsterAndDestroyWeapon** `` - Holsters the character's current weapon and destroys it. This input originally only existed on NPCs, but it's been moved here so it can be used on players as well. +* **UnholsterWeapon** `` - Unholsters the character's last weapon. This input originally only existed on NPCs, but it's been moved here so it can be used on players as well. A specific weapon can also now be specified in the parameter. If the specified weapon does not exist, it will be created with no fanfare. +* **SwitchToWeapon** `` - Makes the character switch to the specified weapon. On NPCs, this input "snaps" their active weapon to this one with no animation. If the specified weapon does not exist, it will be created with no fanfare. +* **GiveWeapon** `` - Gives the character the specified weapon. This input already existed on companions like citizens, but it's been moved so it can be used on all NPCs as well as players. +* **DropWeapon** `` - Makes the character the drop their current weapon, or a specific weapon. +* **PickupWeaponInstant** `` - Makes the character instantly pick up the specified weapon, which should be an entity in the world. This is similar to the "PickupWeapon" input on NPCs, but it's here so players can use it as well. + +[[Additional NPC-specific weapon inputs exist.|Base NPC]] + +### Outputs +--- +* **OnWeaponEquip** `` - Fires when a character obtains a weapon in any way, including weapons it spawns with. Passes the weapon entity. +* **OnWeaponDrop** `` - Fires when a character drops a weapon. Passes the weapon entity. +--- +* **OnKilledEnemy** `` - Fires when a character kills an enemy. +* **OnKilledPlayer** `` - Fires when a character kills a player. +--- +* **OnHealthChanged** `` - Fires when a character's health changes, outputting a ratio in between 0 and 1 based on their current health and their max health. + +### KeyValues +--- +* **Proficiency override** `` - Overrides a character's weapon proficiency. +* **Force server ragdoll** `` - Forces this character to turn into a serverside prop_ragdoll instead of a clientside ragdoll when it dies. \ No newline at end of file