mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-24 13:55:31 +03:00
Page:
Base Combat Character
Pages
Base Animating
Base Combat Character
Base Entity
Base NPC
Base Weapon
Convar Lookup
Debug Commands
Drawing entities in specific view IDs
Entity List
Enum Reference
Filters
Frequently Asked Questions (FAQ)
Gameplay Changes
Graphical Changes
Home
How Mapbase can be used in specific settings
I O System Changes
Introduction to Mapbase
List of Modified Source Files
Map Compilers
Map Specific Scripts
Mapbase Credits
Mapbase Disclaimers
Mapbase Multi Tool
Mapbase Setup Troubleshooting
Media Resources
Modding with Mapbase
Prefabs and workarounds obsoleted by Mapbase
Projected textures
RPC Integration (Discord, etc.)
Reviewing Mapbase pull requests
Setting up Mapbase
Shader Changes
Skyboxes
Using Git with Mapbase
Using Mapbase Content
Using VScript as a HL2 mapper
VScript Basic Entity Code Tutorial
VScript Basic IO Tutorial
VScript Filters
VScript VScriptProxy
VScript in Mapbase
Wildcards and Matchers
math_lightpattern
1
Base Combat Character
Blixibon edited this page 2019-11-28 18:51:27 -06:00
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
<integer>
- Overrides a character's weapon proficiency, or how accurate their shots are. -1 reverts to the character's default proficiency. - SetForceServerRagdoll
<bool>
- Forces this character to turn into a serverside prop_ragdoll instead of a clientside ragdoll when it dies.
- SetBloodColor
<integer>
- Sets a character's blood color. - SetRelationship
<target><disposition><priority>
- 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
<void>
- 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
<void>
- 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
<string>
- 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
<string>
- 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
<string>
- 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
<string>
- Makes the character the drop their current weapon, or a specific weapon. - PickupWeaponInstant
<ehandle>
- 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.
Outputs
- OnWeaponEquip
<ehandle>
- Fires when a character obtains a weapon in any way, including weapons it spawns with. Passes the weapon entity. - OnWeaponDrop
<ehandle>
- Fires when a character drops a weapon. Passes the weapon entity.
- OnKilledEnemy
<ehandle>
- Fires when a character kills an enemy. - OnKilledPlayer
<ehandle>
- Fires when a character kills a player.
- OnHealthChanged
<float>
- 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
<integer>
- Overrides a character's weapon proficiency. - Force server ragdoll
<bool>
- Forces this character to turn into a serverside prop_ragdoll instead of a clientside ragdoll when it dies.
- Something Index
- Something special
- Something else