CBaseCombatCharacter: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{stub}}
{{stub}}
{{CD|CBaseCombatCharacter|base=CBaseFlex|file1=[https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/basecombatcharacter.cpp basecombatcharacter.cpp]}}
{{CD|CBaseCombatCharacter|base=CBaseFlex|file1=[https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/server/basecombatcharacter.cpp basecombatcharacter.cpp]}}


<code>CBaseCombatCharacter</code> is the class base used for characters, NPCs and players alike, without AI.
<code>CBaseCombatCharacter</code> is the class base used for characters, NPCs and players alike, without AI.

Revision as of 01:04, 29 May 2025

Stub

This article or section is a stub. You can help by expanding it.

C++ Class hierarchy
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ basecombatcharacter.cpp

CBaseCombatCharacter is the class base used for characters, NPCs and players alike, without AI.

Keyvalues

CBaseCombatCharacter:

Relationship (Relationship) <string> !FGD
<string|targetname or classname> <string|disposition> <int|rank>
Changes whether this entity likes or dislikes certain other things. Used like the ai_relationship entity, with this entity as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
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.

Inputs

CBaseCombatCharacter:

KilledNPC  !FGD
Tells the entity it killed something. Despite the name, this can include a player. This input will be automatically sent by the victim when they die.
physdamagescale <floatRedirectInput/float>
Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics.