CBaseCombatCharacter

From Source Entities
Jump to navigation Jump to search

CBaseCombatCharacter is a code class that holds functionality common between NPCs, players, and a number of miscellaneous objects.

ConVars/Commands[edit | edit source]

ConVar/CommandParameters or default valueParameter TypeEffect
ai_show_hull_attacks00 disables, 1 enablesShows the range of some melee-based attacks.
ai_force_serverside_ragdoll00 disables, 1 enablesTo do: Effect description.
ai_use_visibility_cache10 disables, 1 enablesTo do: Effect description.
phys_stressbodyweights5To do: Effect description.
phys_impactforcescale1To do: Effect description.
phys_upimpactforcescale0.375To do: Effect description.

Keyvalues[edit | edit source]

Relationship (Not in FGD) (Relationship) <string>
Sets a relationship for this entity, without requiring an ai_relationship entity to be set up.
Format: target_name_or_class disposition priority
Physics Impact Damage Scale (physdamagescale) <float>
Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.
Hull Type (Not in FGD) (HullType) <choices> (available in all games since Asw.png)
Bounding box setting for this entity. To do: Does this work? No effects observed.
  • 0: Human
  • 1: Small centered
  • 2: Wide human
  • 3: Tiny
  • 4: Wide short
  • 5: Medium
  • 6: Tiny centered
  • 7: Large
  • 8: Large centered
  • 9: Medium tall
  • 10: Tiny fluid
  • 11: Medium big
Blood Color (Not in FGD) (BloodColor) <choices> (available in all games since Asw.png)
Color of blood when this entity is hurt. There are other valid values, but they have no apparent effect. Effects have only been seen in Portal 2, with player and npc_personality_core.
  • -1: No blood
  • 0: Red blood

Inputs[edit | edit source]

KilledNPC (Not in FGD)
Tells the entity it killed something. Despite the name, this can include a player. This input is automatically sent by the victim when they die. Responses to this input vary by entity (OnKilledNPC function).
PhysDamageScale <float>
Sets Physics Impact Damage Scale.