Item suitcharger: Difference between revisions
Jump to navigation
Jump to search

Placement Tip:
Note:
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
(-added class hierarchy, cleanup) |
||
Line 1: | Line 1: | ||
{{langsp}} | {{langsp}} | ||
{{CD|CNewRecharge|file1=func_recharge.cpp}} | |||
[[File: item_suitcharger.png | right | 200px]] | [[File: item_suitcharger.png | right | 200px]] | ||
Line 7: | Line 8: | ||
*To ensure that the player will gain battery 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 battery 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|{{clr}} | ||
{{clr}} | |||
*A suit charger will contain the same total charge regardless of the difficulty setting. | *A suit charger will contain the same total charge regardless of the difficulty setting. | ||
*A normal suit charger (without any flags checked or cvars changed) will be able to discharge a total of 75 power points (30 in HL2DM). | *A normal suit charger (without any flags checked or cvars changed) will be able to discharge a total of 75 power points (30 in HL2DM). | ||
Line 23: | Line 20: | ||
*Players can't use it past the limit. ''Deny.'' Confirmed with {{hl2|4}}. | *Players can't use it past the limit. ''Deny.'' Confirmed with {{hl2|4}}. | ||
*If you create a map for {{Bms|4}} there player is not HEV/PCV guy - use <code>sk_charger_suit_maxarmor 0</code> cvar to prevent charger use. | *If you create a map for {{Bms|4}} there player is not HEV/PCV guy - use <code>sk_charger_suit_maxarmor 0</code> cvar to prevent charger use. | ||
}} | |||
==Flags== | ==Flags== | ||
{{fl|8192|Citadel recharger}} | |||
{{fl|16384|Kleiner's recharger}} | |||
==Keyvalues== | ==Keyvalues== | ||
{{KV Targetname}} | |||
{{KV|Deathmatch recharge delay|intn=dmdelay|integer}} | {{KV|Deathmatch recharge delay|intn=dmdelay|integer}} | ||
{{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}} | ||
Line 52: | Line 34: | ||
:*1: Clean | :*1: Clean | ||
:*2: Dirty|only=BMS}} | :*2: Dirty|only=BMS}} | ||
==Inputs== | ==Inputs== | ||
{{IO|SetCharge|Set ''charge'' and ''total charge'' to a specific amount. | {{IO|SetCharge|Set ''charge'' and ''total charge'' to a specific amount. (Not in in {{Bms}})|param=float|nofgd=1}} | ||
{{note|Float values cause the model to change, but charge received is rounded down.}} | :{{note|Float values cause the model to change, but charge received is rounded down.}} | ||
{{note|Despite this input not being in the stock FGD, it is used once by Valve, in {{ent|ep1_citadel_03}}.}} | :{{note|Despite this input not being in the stock FGD, it is used once by Valve, in {{ent|ep1_citadel_03}}.}} | ||
{{IO|Recharge|Sets charge to maximum. | {{IO|Recharge|Sets charge to maximum. (Not in in {{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}} | ||
{{IO|Enable|param=void|Allows to use, sets skin 0, turns light on.|only=BMS}} | {{IO|Enable|param=void|Allows to use, sets skin 0, turns light on.|only=BMS}} | ||
{{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}} | ||
==Outputs== | ==Outputs== | ||
{{IO|OutRemainingCharge|Fired once for every single point of power given to the suit. This means it will not fire when the charger is depleted or when the suit is at full power. | {{IO|OutRemainingCharge|Fired once for every single point of power given to the suit. This means it will not fire when the charger is depleted or when the suit is at full power. (Not in in {{Bms}})}} | ||
{{IO|OnHalfEmpty|Fired when the "charge left" reaches 50% of its max. | {{IO|OnHalfEmpty|Fired when the "charge left" reaches 50% of its max. (Not in in {{Bms}})}} | ||
{{IO|OnEmpty|Fired when the charger is empty.}} | {{IO|OnEmpty|Fired when the charger is empty.}} | ||
{{IO|OnFull|Fired when player gets recharged to the max. | {{IO|OnFull|Fired when player gets recharged to the max. (Not in 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. Cut in {{Bms|4}}.}} | ||
{{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}} | ||
Line 76: | Line 54: | ||
{{IO|OnTurnOn|nofgd=1|Fires on enable.|only=BMS}} | {{IO|OnTurnOn|nofgd=1|Fires on enable.|only=BMS}} | ||
{{ | ==ConVars/Commands== | ||
{{ | {{varcom|start}} | ||
{{varcom|sk_suitcharger|75 (HL2), 30 {{hl2dm|4}}|Arbitrary number|Total charge of suit points on a normal charger.}} | |||
{{varcom|sk_suitcharger_citadel|500 (HL2), 200 {{hl2dm|4}}|Arbitrary number|Total charge of suit points on a citadel charger.}} | |||
{{varcom|sk_suitcharger_citadel_maxarmor|200|Arbitrary number|Maximum suit charge obtainable from a citadel charger.}} | |||
{{varcom|cl_suitcharg_light_col_r|0 {{Bms|4}}|Arbitrary number|Red color value for dynamic light from suit chargers.}} | |||
{{varcom|cl_suitcharg_light_col_g|255 {{Bms|4}}|Arbitrary number|Green color value for dynamic light from suit chargers.}} | |||
{{varcom|cl_suitcharg_light_col_b|255 {{Bms|4}}|Arbitrary number|Blue color value for dynamic light from suit chargers.}} | |||
{{varcom|cl_suitcharg_light_intensity|32 {{Bms|4}}|Arbitrary number|Intensity value for dynamic light from suit chargers.}} | |||
{{varcom|cl_suitcharg_light_on|1 {{Bms|4}}|Arbitrary number|Sets state of dynamic light spawn by suit chargers. 0 - disallow to spawn, 1 - allow to spawn.}} | |||
{{varcom|cl_suitcharg_light_range|64 {{Bms|4}}|Arbitrary number|Range value for dynamic light from suit chargers.}} | |||
{{varcom|cl_suitcharg_light_debug|0 {{Bms|4}}|Arbitrary number|Sets debug state of suit chargers light.}} | |||
{{varcom|sk_charger_suit_maxarmor|100 {{Bms|4}}|Arbitrary number|If amount of player's armor exceeds number specified in this cvar - player will not be able to charge from suit chargers.}} | |||
{{varcom|sk_charger_suit_rate|1 {{Bms|4}}|Arbitrary number|Sets charging speed from suit 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:26, 2 July 2024


![]() |
---|
CNewRecharge |
![]() |
item_suitcharger
is a point entity available in Half-Life 2,
Half-Life 2: Episode One,
Half-Life 2: Episode Two, and
Half-Life 2: Deathmatch. This is the HEV suit charger which gradually replenishes suit power on use, until empty or the suit is at full power.

- Chargers 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 battery 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 suit charger will contain the same total charge regardless of the difficulty setting.
- A normal suit charger (without any flags checked or cvars changed) will be able to discharge a total of 75 power points (30 in HL2DM).
- A Citadel recharger will be able to discharge a total of 500 power points (200 in HL2DM), overcharging the HEV suit to a maximum of 200 power points, and while recharging it will also heal health.
- Kleiner's recharger will be able to discharge a total of 25 power points, regardless of cvar settings.
- A Citadel/Kleiner recharger combo (with both flags checked) will be able to discharge a total of 30 power points (since Kleiner's recharger is set to 25 power points no matter what, and a Citadel recharger rounds it up to the nearest 10), overcharging the HEV suit to a maximum of 200 power points, and while recharging it will also heal (a total of 15) health for free.
- Players can change weapons while charging. Confirmed with
Half-Life 2: Deathmatch.
- Players can fire any weapon while charging. Confirmed with
Half-Life 2: Deathmatch.
- Players can reload weapons while charging. Confirmed with
Half-Life 2: Deathmatch.
- Players can't use it without the suit. Deny. Confirmed with
Half-Life 2.
- Players can't use it past the limit. Deny. Confirmed with
Half-Life 2.
- If you create a map for
Black Mesa there player is not HEV/PCV guy - use
sk_charger_suit_maxarmor 0
cvar to prevent charger use.
Flags
- Citadel recharger : [8192]
- Kleiner's recharger : [16384]
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
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) <integer>
- Charge (charge) <float> (only in
)
- How full the charger should be (0 - 100)
- Force Skin (skintype) <choices> (only in
)
- Determines model that the charger will use, dirty or clean.
- 0: None
- 1: Clean
- 2: Dirty
Inputs
- SetCharge <float > !FGD
- Set charge and total charge to a specific amount. (Not in in
)
Note:Float values cause the model to change, but charge received is rounded down.
Note:Despite this input not being in the stock FGD, it is used once by Valve, in ep1_citadel_03.
Outputs
- OutRemainingCharge
- Fired once for every single point of power given to the suit. This means it will not fire when the charger is depleted or when the suit is at full power. (Not in in
)
- OnEmpty
- Fired when the charger is empty.
- OnPlayerUse
- Fired when the player tries to +use the charger. Cut in
Black Mesa.
- OnUse (only in
)
- Fired when the player tries to +use the charger.
- OnTurnOff (only in
) !FGD
- Fires on disable.
- OnTurnOn (only in
) !FGD
- Fires on enable.
ConVars/Commands
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
sk_suitcharger | 75 (HL2), 30 ![]() |
Arbitrary number | Total charge of suit points on a normal charger. |
sk_suitcharger_citadel | 500 (HL2), 200 ![]() |
Arbitrary number | Total charge of suit points on a citadel charger. |
sk_suitcharger_citadel_maxarmor | 200 | Arbitrary number | Maximum suit charge obtainable from a citadel charger. |
cl_suitcharg_light_col_r | 0 ![]() |
Arbitrary number | Red color value for dynamic light from suit chargers. |
cl_suitcharg_light_col_g | 255 ![]() |
Arbitrary number | Green color value for dynamic light from suit chargers. |
cl_suitcharg_light_col_b | 255 ![]() |
Arbitrary number | Blue color value for dynamic light from suit chargers. |
cl_suitcharg_light_intensity | 32 ![]() |
Arbitrary number | Intensity value for dynamic light from suit chargers. |
cl_suitcharg_light_on | 1 ![]() |
Arbitrary number | Sets state of dynamic light spawn by suit chargers. 0 - disallow to spawn, 1 - allow to spawn. |
cl_suitcharg_light_range | 64 ![]() |
Arbitrary number | Range value for dynamic light from suit chargers. |
cl_suitcharg_light_debug | 0 ![]() |
Arbitrary number | Sets debug state of suit chargers light. |
sk_charger_suit_maxarmor | 100 ![]() |
Arbitrary number | If amount of player's armor exceeds number specified in this cvar - player will not be able to charge from suit chargers. |
sk_charger_suit_rate | 1 ![]() |
Arbitrary number | Sets charging speed from suit chargers. |
sk_charger_refill_delay | 15 ![]() |
Arbitrary number | Delay before refill for suit and health chargers in seconds. Multiplayer only. |
See also
- func_recharge, a brush-based version of this entity.
- item_healthcharger, a version of this entity meant for health.
Categories:
- TODO rewrite langsp to LanguageBar
- CBaseAnimating
- Point entities
- Non-internal Half-Life 2 entities
- Half-Life 2 entities
- Half-Life 2 point entities
- Non-internal Half-Life 2: Episode One entities
- Half-Life 2: Episode One entities
- Half-Life 2: Episode One point entities
- Non-internal Half-Life 2: Episode Two entities
- Half-Life 2: Episode Two entities
- Half-Life 2: Episode Two point entities
- Non-internal Half-Life 2: Deathmatch entities
- Half-Life 2: Deathmatch entities
- Half-Life 2: Deathmatch point entities
- Items