Item ammo crate: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(You may want to remove this, I won't mind if you'll do due to the link in Class hierarchy.)
Line 3: Line 3:
[[File:item_ammo_crate.png|right|300px]]
[[File:item_ammo_crate.png|right|300px]]


{{this is a|point entity|name=item_ammo_crate|game=Half-Life 2|game1=Half-Life 2: Episode One|game2=Half-Life 2: Episode Two|game3=Half-Life 2: Deathmatch|game4=Black Mesa}} This entity places a large crate containing an ''unlimited'' supply of a certain type of ammo (specified by '''Ammo Type'''). The player can open it as many times as desired, by pressing the {{Ent|+use}} key ({{Key|E}} by default), and get a complete refill of the specified ammo type.
{{this is a|point entity|name=item_ammo_crate|game=Half-Life 2|game1=Half-Life 2: Episode One|game2=Half-Life 2: Episode Two|game3=Half-Life 2: Deathmatch|game4=Black Mesa}} This entity places a large crate containing an ''unlimited'' supply of a certain type of ammo (specified by '''Ammo Type'''). The player can open it as many times as desired, by pressing the {{Ent|+use}} key ({{Key|E}} by default), and get a complete refill of the specified ammo type. Most inputs, outputs and properties are same as [[CBaseAnimating]].


{{ModernPlacementTip|This entity should not be placed in areas with many opponents, since this crate provides the player with a big advantage against any opponents in the area.}}
{{ModernPlacementTip|This entity should not be placed in areas with many opponents, since this crate provides the player with a big advantage against any opponents in the area.}}
Line 10: Line 10:


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV|Ammo Type|intn=AmmoType|choices|Decides which ammo will be inside the crate. Warning: the [[fgd]] defaults to pistol, which are only available in EP2.}}
{{KV|Ammo Type|intn=AmmoType|choices|Decides which ammo will be inside the crate. Warning: the [[fgd]] defaults to pistol, which are only available in EP2.}}
:{| class=standard-table
:{| class=standard-table

Revision as of 03:02, 18 May 2025

English (en)Translate (Translate)
C++ Class hierarchy
CItem_AmmoCrate
CBaseAnimating
CBaseEntity
C++ item_ammo.cpp
Item ammo crate.png

item_ammo_crate is a point entity available in Half-Life 2 Half-Life 2, Half-Life 2: Episode One Half-Life 2: Episode One, Half-Life 2: Episode Two Half-Life 2: Episode Two, Half-Life 2: Deathmatch Half-Life 2: Deathmatch, and Black Mesa Black Mesa. This entity places a large crate containing an unlimited supply of a certain type of ammo (specified by Ammo Type). The player can open it as many times as desired, by pressing the +use key (E by default), and get a complete refill of the specified ammo type. Most inputs, outputs and properties are same as CBaseAnimating.

PlacementTip.gifPlacement Tip:This entity should not be placed in areas with many opponents, since this crate provides the player with a big advantage against any opponents in the area.


Keyvalues

Ammo Type (AmmoType) <choices>
Decides which ammo will be inside the crate. Warning: the fgd defaults to pistol, which are only available in EP2.
Value Ammo Type Comment
0 item_ammo_pistol (only in Half-Life 2: Episode Two)
1 item_ammo_smg1
2 item_ammo_ar2
3 item_rpg_round
4 item_box_buckshot (only in Half-Life 2: Episode Two)
5 weapon_frag
6 item_ammo_357 Uses SMG crate, but provides correct ammo. Can confuse players!
7 item_ammo_crossbow Uses SMG crate, but provides correct ammo. Can confuse players!
8 item_ammo_ar2_altfire Exact same crate as regular AR2 ammo. Can confuse players!
9 item_ammo_smg1_grenade (only in Half-Life 2: Episode Two) Different crate model, with grenades inside, but icon is still SMG. Can confuse players!

Outputs

OnUsed
Fires when used by the player.

See also