Item battery (Half-Life: Source): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Improved the article with an image of the battery model (which is the same from the original Half-Life) and a description with some extra content based on the other item_battery articles with some KV and O from the FGD)
(Misleading to list model kv)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{TabsBar|main=item_battery}}{{stub}}
{{TabsBar|main=item_battery}}
[[File:W battery goldsrc.png|thumb|right|200px|Worldmodel.]]
[[File:W battery goldsrc.png|thumb|right|200px|Worldmodel (models/w_battery.mdl).]]
{{CD|CItemBattery|base=CHL1Item|nolink=1|file1=hl1_item_battery.cpp}}
{{CD|CItemBattery|base=CHL1Item|nolink=1|file1=hl1_item_battery.cpp}}
{{This is a|model entity|name=item_battery|game=Half-Life: Source}}
{{This is a|model entity|name=item_battery|game=Half-Life: Source}}
 
This item charges up the [[item_suit (Half-Life: Source)|HEV suit]] by amount specified in cvar <code>sk_battery [int]</code>. (15 on easy and normal difficulty, 10 on hard)
==Description==
This item charges up the [[item_suit (Half-Life: Source)|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 <code>sk_battery [int]</code>.


This battery is based on the [[item_battery_(GoldSrc)|original battery]] but instead in the {{Source|4}} engine.
This battery is based on the [[item_battery_(GoldSrc)|original battery]] but instead in the {{Source|4}} engine.


==Keyvalues==
==Keyvalues==
{{Studio rendering note|model}}
{{KV Targetname}}
{{KV Targetname}}
{{KV Angles}}
{{KV Shadow}}


==Outputs==
==Outputs==
{{O|OnPlayerTouch|Fires when the player touches this object}}
{{O Item}}
 
== See Also ==
* {{ent|item_suit|game=Half-Life: Source}}


[[Category:Items]]
[[Category:Items]]
== See Also ==
* {{ent|item_suit (Half-Life: Source)}}

Latest revision as of 15:25, 26 May 2025

Source Engine ( General | Half-Life: Source | Black Mesa )
edit
Worldmodel (models/w_battery.mdl).
C++ Class hierarchy
CItemBattery
CHL1Item
CItem
CBaseAnimating
CBaseEntity
C++ hl1_item_battery.cpp

item_battery is a model entity available in Half-Life: Source Half-Life: Source. This item charges up the HEV suit by amount specified in cvar sk_battery [int]. (15 on easy and normal difficulty, 10 on hard)

This battery is based on the original battery but instead in the Source Source engine.

Keyvalues

Note.pngNote: See Model entity/Generic Keyvalues, Inputs and Outputs for keyvalues and inputs that affect model rendering.
Note that the following keyvalues are unavailable due to being overridden by game code:
model
It may still be possible to use their associated inputs or AddOutput them.
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

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.

See Also