Item ammo crate: Difference between revisions
Jump to navigation
Jump to search

Placement 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.
Note:It can be used if it received damage and if player holds weapon_crowbar. This means that a player can open it with the crowbar or with grenades if holding crowbar, distance doesn't matter.
Warning:The fgd defaults to pistol, which are only available in
Half-Life 2: Episode Two.
(Added AmmoType value 9 (SMG Altfire)) |
MyGamepedia (talk | contribs) |
||
(42 intermediate revisions by 15 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar|title = item_ammo_crate}} | ||
[[ | {{CD|CItem_AmmoCrate|file1=item_ammo.cpp}} | ||
{{ | [[File:item_ammo_crate_smg1.png|200px||thumb|right|Ammo crate model with [[Weapon smg1|SMG1]] ammo for {{hl2|1}}.]] | ||
[[File:item_ammo_crate_bms.png|200px||thumb|right|Ammo crate model with [[item_grenade_rpg|RPG]] ammo for {{bms|1}}.]] | |||
== | {{this is a|model entity|name=item_ammo_crate|game=Half-Life 2 series|game1=Black Mesa}} This entity places a large crate containing an ''unlimited'' supply of a certain type of ammo (specified by '''Ammo Type'''). The {{ent|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]]. | ||
This entity places a large crate | |||
{{ | {{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.}} | ||
{{note|It can be used if it received damage and if player holds {{ent|weapon_crowbar}}. This means that a player can open it with the crowbar or with grenades if holding crowbar, distance doesn't matter.}} | |||
__NOTOC__ | |||
==Keyvalues== | ==Keyvalues== | ||
{{KV | {{KV|Model|intn=model|studio|Model to use for this entity.|only=bms}} | ||
{{KV|Ammo Type|intn=AmmoType|choices|Decides which ammo will be inside the crate. | |||
{{KV|AmmoType|choices|Decides | |||
{{warning|The [[fgd]] defaults to pistol, which are only available in {{hl2ep2|4}}.}} | |||
|- | {{important|Used crate model depends on value from here {{not|{{bms}}}}.}} | ||
| | |||
|- | {{expand|title=Half Life 2 series.| | ||
| | * {{ent|item_ammo_pistol}} (0) - {{hl2ep2|only}} | ||
| | |||
| | * {{ent|item_ammo_smg1}} (1) | ||
|- | |||
| | * {{ent|item_ammo_ar2}} (2) | ||
|- | |||
| | * {{ent|item_rpg_round}} (3) | ||
| | * {{ent|item_box_buckshot}} (4) - {{hl2ep2|only}} | ||
| | * {{ent|weapon_frag}} (5) | ||
| | * {{ent|item_ammo_357}} (6) - Uses [[weapon_smg1|SMG]] crate, but provides correct ammo. Can confuse players! Fixed in {{mapbase|4}}. | ||
| | * {{ent|item_ammo_crossbow}} (7) - Uses SMG crate, but provides correct ammo. Can confuse players! Fixed in {{mapbase|4}}. | ||
| | * {{ent|item_ammo_ar2_altfire}} (8) - Exact same crate as regular AR2 ammo. Can confuse players! Fixed in {{mapbase|4}}. | ||
|} | |||
* {{ent|item_ammo_smg1_grenade}} (9) - {{hl2ep2|only}} Different crate model, with grenades inside, but icon is still SMG. Can confuse players! | |||
* {{ent|weapon_slam}} (10) - {{mapbase|only}} | |||
* Empty (11) - {{mapbase|only}} | |||
{{bug|tested={{hl2ep2}}|Not using one of these will result instant crash.}} | |||
}} | |||
{{expand|title=Black Mesa.| | |||
* [[item_ammo_glock|9mm Rounds]] (9mm) - ammo type used for {{ent|weapon_mp5}} (main ammo), {{ent|weapon_glock}} and {{ent|weapon_assassin_glock}}. | |||
* [[Item ammo 357 (Black Mesa)|357]] (357) - ammo type used for {{ent|weapon_357}}. | |||
* [[Item ammo crossbow (Black Mesa)|Bolts]] ([[grenade_bolt|bolt]]) - ammo type used for {{ent|weapon_crossbow}}. | |||
* [[Item ammo shotgun|Buckshot]] (buckshot) - ammo type used for {{ent|weapon_shotgun}}. | |||
* [[Item ammo energy|Energy]] (energy) - ammo type used for {{ent|weapon_gluon}} and {{ent|weapon_tau}}. | |||
* [[Item grenade mp5|MP5 Grenade]] ([[grenade_mp5]]) - ammo type used for {{ent|weapon_mp5}} (secondary ammo). | |||
* [[Item grenade rpg|RPG]] ([[grenade_rpg]]) - ammo type used for {{ent|weapon_rpg}}. | |||
* [[Item weapon frag|Frag Grenades]] ([[grenade_frag]]) - ammo type used for {{ent|weapon_frag}}. | |||
* [[Item weapon satchel|Satchels]] ([[grenade_satchel]]) - ammo type used for {{ent|weapon_satchel}}. | |||
* [[Item weapon tripmine|Tripmines]] ([[grenade_tripmine]]) - ammo type used for {{ent|weapon_tripmine}}. | |||
* [[Item weapon snark|Snark]] ([[npc_snark|snark]]) - not in [[FGD]], ammo type used for {{ent|weapon_snark}}. | |||
* [[Item weapon hivehand|Hornet]] ([[grenade_hornet]]) - not in [[FGD]], ammo type used for {{ent|weapon_hivehand}}. | |||
* {{w|.50 BMG}} (50cal) - not in [[FGD]], not used for any of the weapons that can be picked up by the player by default. | |||
* [[npc_sentry_ground|Sentry]] (sentry) - not in [[FGD]], not used for any of the weapons that can be picked up by the player by default. | |||
* Sniper Round (SniperRound) - not in [[FGD]], not used for any of the weapons that can be picked up by the player by default. | |||
* Sniper Penetrated Round (SniperPenetratedRound) - not in [[FGD]], not used for any of the weapons that can be picked up by the player by default. | |||
{{note|Not using one of these will result entity disappear.}} | |||
{{bug|hidetested=1|Player will not get a new weapon ({{ent|weapon_tripmine}}, {{ent|weapon_satchel}}, {{ent|weapon_frag}} or {{ent|weapon_snark}}) if didn't pick up it before. Interaction with this entity adds the ammo amount, but not giving anything.}} | |||
}} | |||
== | }} | ||
{{ | {{KV|CanMove|intn=isdynamicmoving|bool|Doesn't work. Mentioned only once in ''bm_c4a4a''. It was probably planned to provide movement to the crate for one of the rooms.|only=bms}} | ||
{{KV|Ammo Count|intn=ammocount|integer|Amount of specified ammo to give.|only=bms}} | |||
==Outputs== | ==Outputs== | ||
{{O | {{O|OnUsed|activator = the player that used this|Fires when [[+use|used]] by the player.}} | ||
==See also== | ==See also== |
Latest revision as of 05:57, 2 August 2025


![]() |
---|
CItem_AmmoCrate |
![]() |
item_ammo_crate
is a model entity available in Half-Life 2 series and
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.


Keyvalues
- Model (model) <model path> (only in
)
- Model to use for this entity.
- Ammo Type (AmmoType) <choices>
- Decides which ammo will be inside the crate.


|
![]() ![]() |
- CanMove (isdynamicmoving) <boolean> (only in
)
- Doesn't work. Mentioned only once in bm_c4a4a. It was probably planned to provide movement to the crate for one of the rooms.
- Ammo Count (ammocount) <integer> (only in
)
- Amount of specified ammo to give.
Outputs
- OnUsed
- !activator = the player that used this
!caller = this entity
Fires when used by the player.
See also
- Crates - For basic crates