Item healthcharger

From Valve Developer Community
Revision as of 18:00, 23 July 2023 by Hoppler (talk | contribs)
Jump to navigation Jump to search
English (en)Translate (Translate)
Item healthcharger.png

Template:Entity This is the health charger which gradually replenishes player health on use, until empty or the player is at full health. A charger normally holds 50 health points, regardless of the difficulty setting.

PlacementTip.gifPlacement Tip:
  • Rechargers are best placed with a height of around 48 units between the floor and the center of the recharger entity.
  • To ensure that the player will gain health rather than lose it, place them in areas occluded from immediate danger, like constant enemy fire from helicopters or tanks. Consider however that, since the player is required to stare at the wall while they are using the charger, they can be used to create tension by placing them where an enemy might still reach the player. Note that chargers could also add good or bad stress to the player if they have to exterminate a load of enemies in a room which a health charger is placed before using it.
C++ In code, it is represented by theCNewWallHealthclass, defined in theitem_healthkit.cppfile.

Notes

  • Players can't use it past the limit or maximum health points. Deny. Confirmed with Half-Life 2 Half-Life 2.

ConVars/Commands

Cvar/Command Parameters or default value Descriptor Effect
sk_healthcharger 50 Arbitrary number Amount of health that can be gained from a single charger.

Keyvalues

Note.pngNote:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history


Inputs

Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history


Outputs

OutRemainingCharge
Fires once for every single point of health given to the player. This means it will not fire when the charger is depleted or when the player is at full health.
OnPlayerUse
Fired when the player tries to +use the charger.
Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history


See also