This article relates to the game "Half-Life 2". Click here for more information.

item_battery

From Valve Developer Community
Jump to: navigation, search
English (en)Translate (Translate)

Worldmodel.
Class hierarchy
CItemBattery
CItem
CBaseAnimating
CBaseEntity
item_battery.cpp

item_battery is a point entity available in Half-Life 2 series Half-Life 2 series.

Description

This item charges up the HEV suit by 15 energy points (regardless of the difficulty setting).

The amount of power given by the battery can be changed with the console command sk_battery [int]. The command also affects how much power will be given in HL2 by Stunsticks, as picking one up will provide 50% of the value of sk_battery.[1] As it is rounded down, by default the player receives 7 points of charge.

Npc_cscanner and Npc_clawscanner both have 30% chance of dropping an item_battery upon being destroyed, unless they have the spawnflag "Don't drop weapons".[2]

PlacementTip.gifPlacement Tip:Place this entity at least one unit above its resting surface to prevent its position from being disturbed in-game.

Keyvalues

Name (targetname) <string>
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

Flags

Start Constrained : [1]

Spawns with motion disabled.

Outputs

Item:

OnPlayerTouch
Fires when the player touches this item. !activator is the player.
OnCacheInteraction
This output fires when the player proves they have "found" this item.
Fires on:
  • Player Touch (whether or not player actually acquires the item).
  • Picked up by +use.
  • Picked up by gravity gun.
  • Punted by gravity gun.

References

References

See Also