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)

Worldmodel.
class hierarchy
CItemBattery defined in item_battery.cpp
CItem
CBaseAnimating
CBaseEntity

item_battery is a point entity available in Half-Life 2 Half-Life 2, Half-Life 2: Deathmatch Half-Life 2: Deathmatch, Half-Life 2: Episode One Half-Life 2: Episode One, Half-Life 2: Episode Two Half-Life 2: Episode Two, and Half-Life 2: Lost Coast Half-Life 2: Lost Coast.

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 targetname that other entities refer to this entity by.

Flags

  •  [1] : Start Constrained
       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