item_suitcharger

From Valve Developer Community
Jump to: navigation, search
Suit Charger

<Half-Life 2> item_suitcharger is a point entity available in the Half-Life 2 series.

Entity description

Gradually charges up HEV suit energy on use, until empty.

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 Suit points (30 in HL2DM).
  • A Citadel recharger will be able to discharge a total of 500 Suit points (200 in HL2DM), overcharging the HEV suit to a maximum of 200 Suit points, and while recharging it will also heal Health for free.
  • Kleiner's recharger will be able to discharge a total of 25 Suit points, regardless of cvar settings.
  • A Citadel/Kleiner's recharger combo (with both flags checked) will be able to discharge a total of 30 Suit points (since Kleiner's recharger is set to 25 suit points no matter what, and a Citadel recharger rounds it up to the nearest 10), overcharging the HEV suit to a maximum of 200 Suit points, and while recharging it will also heal (a total of 15) Health for free.
Placementtip.gif Placement Tip:
  • Re-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.

Dedicated Console Variables

sk_suitcharger <int>
Changes the total charge of suit points of the normal charger (Default: 75 for HL2, 30 for HL2:DM).
sk_suitcharger_citadel <int>
Changes the total charge of suit points of the citadel charger (Default: 500 for HL2, 200 for HL2:DM.)
sk_suitcharger_citadel_maxarmor <int>
Changes the amount of Suit points you can hold when recharging with a citadel charger (Default: 200).

Keyvalues

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.

Angles:

Pitch Yaw Roll (Y Z X) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
_minlight <float>
Defines the minimum light level.

Flags

  • 8192 : Citadel recharger
Changes charge amount to Citadel recharger amounts (see Entity description).
  • 16384 : Kleiner's recharger
Changes charge amount to Kleiner's recharger amounts (see Entity description).

Inputs

Targetname:

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput  <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug:
In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning:Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2)
Execute a VScript function in the scope of the receiving entity.
Note:This input is missing from some games FGD files.
SetLocalOrigin  <origin> (New with Alien Swarm)
Set this entity's origin in the map.
Note:This input is missing from some games FGD files.
SetLocalAngles  <angles> (New with Alien Swarm)
Set this entity's angles in the map.
Note:This input is missing from some games FGD files.
SetCharge  <float> !FGD
Set total charge and charge to a specific amount.
Note:Float values cause the model to change, but charge received is rounded down.
Note:Despite this input not being in the official FGD files, it is used once in an official map, in episodic, map ep1_citadel_03.
Recharge
Sets charge to maximum

Outputs

Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  

(New with Left 4 Dead)

This Output fires when the entity is killed and removed from the game.
OutRemainingCharge
To do: add description
OnHalfEmpty
Executed when the "charge left" reaches 50% of its max.
OnEmpty
Executed when the Charger is empty.
OnFull
Executed when player gets recharged to the max.
OnPlayerUse
Executed when a player uses the entity (Def. E).

See also