CBaseCombatCharacter: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(I guess this is a start.)
 
No edit summary
Line 3: Line 3:


<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.
==Keyvalues==
{{KV|Relationship|intn=relationship|string| Changes whether this NPC likes or dislikes certain others. Used like the {{ent|ai_relationship}} entity, with this NPC as the subject. Format: <code><[[string]]{{!}}[[targetname]] or [[classname]]> <[[string]]{{!}}disposition> <[[int]]{{!}}rank></code>.
: Values for <code>disposition</code> are:
:* <code>D_HT</code>: Hate
:* <code>D_FR</code>: Fear
:* <code>D_LI</code>: Like
:* <code>D_NU</code>: Neutral|nofgd=1}}
==Inputs==
{{I BaseCombatCharacter}}

Revision as of 09:29, 25 September 2024

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

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

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.