Item healthcharger: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Keyvalues: idk why this is commented out in the fgd)
(-added class hierarchy, cleanup)
Line 1: Line 1:
{{langsp}}[[File: item_healthcharger.png | right | 200px]]
{{langsp}}
{{CD|CNewWallHealth|file1=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.
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.


Line 6: Line 8:
*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.}}
*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.}}


{{code class|CNewWallHealth|item_healthkit.cpp}}
{{Note|{{clr}}
__TOC__
* Players can't use it past the limit or maximum health points.
{{clr}}
 
== Notes ==
* Players can't use it past the limit or maximum health points. ''Deny.'' Confirmed with {{hl2|4}}.
* Player can use health chargers without suit.
* Player can use health chargers without suit.
 
* Default model: <code>models/props_combine/health_charger001.mdl</code>
==ConVars/Commands==
}}
{{varcom|start}}
{{varcom|sk_healthcharger|50|Arbitrary number|Amount of health that can be gained from a single charger.}}
{{varcom|cl_hpcharg_light_col_r|255 {{Bms|4}}|Arbitrary number|Red color value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_col_g|0 {{Bms|4}}|Arbitrary number|Green color value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_col_b|0 {{Bms|4}}|Arbitrary number|Blue color value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_intensity|32 {{Bms|4}}|Arbitrary number|Intensity value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_on|1 {{Bms|4}}|Arbitrary number|Sets state of dynamic light spawn by health chargers. 0 - disallow to spawn, 1 - allow to spawn.}}
{{varcom|cl_hpcharg_light_range|64 {{Bms|4}}|Arbitrary number|Range value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_debug|0 {{Bms|4}}|Arbitrary number|Sets debug state of health chargers light.}}
{{varcom|sk_charger_health_rate|1 {{Bms|4}}|Arbitrary number|Sets treatment speed from health chargers.}}
{{varcom|sk_charger_refill_delay |15 {{Bms|4}}|Arbitrary number|Delay before refill for suit and health chargers in seconds. Multiplayer only.}}
{{varcom|end}}


==Keyvalues==
==Keyvalues==
{{KV|Deathmatch recharge delay|intn=dmdelay|float}}
{{KV Targetname}}
{{KV|Deathmatch recharge delay|intn=dmdelay|float|{{todo}}}}
{{KV|Charge|intn=charge|float|How full the charger should be (0 - 100)|only=BMS}}
{{KV|Charge|intn=charge|float|How full the charger should be (0 - 100)|only=BMS}}
{{KV|Force Skin|intn=skintype|Choices| |only=BMS}}
{{KV|Force Skin|intn=skintype|Choices| |only=BMS}}
Line 36: Line 23:
*1: Clean
*1: Clean
*2: Dirty
*2: Dirty
{{KV BaseAnimating|base=1}}
{{KV BaseEntity|base=1}}


==Inputs==
==Inputs==
Line 43: Line 28:
{{IO|Disable|param=void|Prevents to use, sets skin 1, turns light off.|only=BMS}}
{{IO|Disable|param=void|Prevents to use, sets skin 1, turns light off.|only=BMS}}
{{IO|Fill|param=float|nofgd=1|Fills the charger with specified number if the charger is empty.|only=BMS}}
{{IO|Fill|param=float|nofgd=1|Fills the charger with specified number if the charger is empty.|only=BMS}}
{{I BaseAnimating}}
{{I BaseEntity|base=1|prel4d=1}}


==Outputs==
==Outputs==
{{IO|OutRemainingHealth|Remaining Health. Cut in {{Bms|4}}.}}
{{IO|OutRemainingHealth|Remaining Health. (not in {{Bms}})}}
{{IO|OnPlayerUse|Fired when the player tries to {{ent|+use}} the charger. Cut in {{Bms|4}}.}}
{{IO|OnPlayerUse|Fired when the player tries to {{ent|+use}} the charger. (not in {{Bms}})}}
{{IO|OnEmpty|Fired when the charger is empty.|only=BMS}}
{{IO|OnEmpty|Fired when the charger is empty.|only=BMS}}
{{IO|OnUse|Fired when the player tries to {{ent|+use}} the charger.|only=BMS}}
{{IO|OnUse|Fired when the player tries to {{ent|+use}} the charger.|only=BMS}}
{{IO|OnTurnOff|nofgd=1|Fires on disable.|only=BMS}}
{{IO|OnTurnOff|nofgd=1|Fires on disable.|only=BMS}}
{{IO|OnTurnOn|nofgd=1|Fires on enable.|only=BMS}}
{{IO|OnTurnOn|nofgd=1|Fires on enable.|only=BMS}}
{{O BaseAnimating}}
 
{{O BaseEntity}}
==ConVars/Commands==
{{varcom|start}}
{{varcom|sk_healthcharger|50|Arbitrary number|Amount of health that can be gained from a single charger.}}
{{varcom|cl_hpcharg_light_col_r|255 {{Bms|4}}|Arbitrary number|Red color value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_col_g|0 {{Bms|4}}|Arbitrary number|Green color value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_col_b|0 {{Bms|4}}|Arbitrary number|Blue color value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_intensity|32 {{Bms|4}}|Arbitrary number|Intensity value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_on|1 {{Bms|4}}|Arbitrary number|Sets state of dynamic light spawn by health chargers. 0 - disallow to spawn, 1 - allow to spawn.}}
{{varcom|cl_hpcharg_light_range|64 {{Bms|4}}|Arbitrary number|Range value for dynamic light from health chargers.}}
{{varcom|cl_hpcharg_light_debug|0 {{Bms|4}}|Arbitrary number|Sets debug state of health chargers light.}}
{{varcom|sk_charger_health_rate|1 {{Bms|4}}|Arbitrary number|Sets treatment speed from health chargers.}}
{{varcom|sk_charger_refill_delay |15 {{Bms|4}}|Arbitrary number|Delay before refill for suit and health chargers in seconds. Multiplayer only.}}
{{varcom|end}}


==See also==
==See also==

Revision as of 08:18, 2 July 2024

English (en)Translate (Translate)
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

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]
Charge (charge) <float> (only in Black Mesa)
How full the charger should be (0 - 100)
Force Skin (skintype) <choices> (only in Black Mesa)

Determines model that the charger will use, dirty or clean.

  • 0: None
  • 1: Clean
  • 2: Dirty

Inputs

Enable <void> (only in Black Mesa)
Allows to use, sets skin 0, turns light on.
Disable <void> (only in Black Mesa)
Prevents to use, sets skin 1, turns light off.
Fill <floatRedirectInput/float> (only in Black Mesa) !FGD
Fills the charger with specified number if the charger is empty.

Outputs

OutRemainingHealth
Remaining Health. (not in Black Mesa)
OnPlayerUse
Fired when the player tries to +use the charger. (not in Black Mesa)
OnEmpty  (only in Black Mesa)
Fired when the charger is empty.
OnUse  (only in Black Mesa)
Fired when the player tries to +use the charger.
OnTurnOff  (only in Black Mesa) !FGD
Fires on disable.
OnTurnOn  (only in Black Mesa) !FGD
Fires on enable.

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.
cl_hpcharg_light_col_r 255 Black Mesa Black Mesa Arbitrary number Red color value for dynamic light from health chargers.
cl_hpcharg_light_col_g 0 Black Mesa Black Mesa Arbitrary number Green color value for dynamic light from health chargers.
cl_hpcharg_light_col_b 0 Black Mesa Black Mesa Arbitrary number Blue color value for dynamic light from health chargers.
cl_hpcharg_light_intensity 32 Black Mesa Black Mesa Arbitrary number Intensity value for dynamic light from health chargers.
cl_hpcharg_light_on 1 Black Mesa Black Mesa Arbitrary number Sets state of dynamic light spawn by health chargers. 0 - disallow to spawn, 1 - allow to spawn.
cl_hpcharg_light_range 64 Black Mesa Black Mesa Arbitrary number Range value for dynamic light from health chargers.
cl_hpcharg_light_debug 0 Black Mesa Black Mesa Arbitrary number Sets debug state of health chargers light.
sk_charger_health_rate 1 Black Mesa Black Mesa Arbitrary number Sets treatment speed from health chargers.
sk_charger_refill_delay 15 Black Mesa Black Mesa Arbitrary number Delay before refill for suit and health chargers in seconds. Multiplayer only.

See also