Item healthcharger: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Reverting vandalism.)
m (Classifying as model entity)
 
(53 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{wrongtitle|title=item_healthcharger}}
{{LanguageBar}}
{{tabsBar |main=Item_healthcharger}}
{{for|about=the point entity|the brush entity|<tt>[[func_healthcharger]]</tt>}}
{{this is a|model entity|name=item_healthcharger|game=Half-Life 2 series}}  
{{CD|CNewWallHealth|file1=hl2/item_healthkit.cpp}}
[[File: item_healthcharger.png | right | 200px]]
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.


==Entity Description==
{{ModernPlacementTip|{{clr}}
[[Image:item_healthcharger.jpg|thumb|200px|right|Health Charger]]
*Rechargers are best placed with a height of around 48 units between the floor and the center of the recharger entity.  
A health charger gradually replenishes player health on use, until empty.
*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.}}


A healthcharger will be able to replenish a total of 50 Health points, regardless of the difficulty setting.
{{Note|{{clr}}
* Players can't use it past the limit or maximum health points.
* Player can use health chargers without suit.
* Default model: <code>models/props_combine/health_charger001.mdl</code>
}}


'''Placement tip:'''
{{Bug|[[Kill|Killing]] a charger while it is being used will make the charging sound loop indefinitely.|hidetested=1}}
*Rechargers are best placed with a height of between 44 and 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.


==Keyvalues==
==Keyvalues==
* {{kv targetname}}
{{KV Targetname}}
* {{kv angles}}
{{KV|Deathmatch recharge delay|intn=dmdelay|float|{{todo}}}}
* '''_minlight'''
: <float> Minimum light level


==Inputs==
==Outputs==
* {{i targetname}}
{{O|OutRemainingHealth|Remaining Health.}}
{{O|OnPlayerUse|Fired when the player tries to {{ent|+use}} the charger.}}


==Outputs==
==ConVars/Commands==
* {{o targetname}}
{{varcom|start}}
* '''OutRemainingCharge <float>'''
{{varcom|sk_healthcharger|50|Arbitrary number|Amount of health that can be gained from a single charger.}}
* '''OnPlayerUse'''
{{varcom|end}}


==See Also==
==See also==
*[[func_healthcharger]]
*{{ent|func_healthcharger}}, a brush-based version of this entity.
*{{ent|item_suitcharger}}, a version of this entity meant for suit power.


[[Category:Entities]] [[Category:Items]]
[[Category:Items]]

Latest revision as of 04:32, 19 May 2025

English (en)Translate (Translate)
edit
This article is about the point entity. For the brush entity, see func_healthcharger.

item_healthcharger is a model entity available in Half-Life 2 series Half-Life 2 series.

C++ Class hierarchy
CNewWallHealth
CBaseAnimating
CBaseEntity
C++ item_healthkit.cpp
Item healthcharger.png

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.
Note.pngNote:
  • Players can't use it past the limit or maximum health points.
  • Player can use health chargers without suit.
  • Default model: models/props_combine/health_charger001.mdl
Icon-Bug.pngBug:Killing a charger while it is being used will make the charging sound loop indefinitely.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Deathmatch recharge delay (dmdelay) <float>
[Todo]

Outputs

OutRemainingHealth
Remaining Health.
OnPlayerUse
Fired when the player tries to +use the charger.

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.

See also