item_ammo_crate

From Valve Developer Community

Jump to: navigation, search


Contents

Entity Description

An item_ammo_crate, containing SMG1 ammo.

This large crate contains an unlimited supply of a certain type of ammo (specified by AmmoType). The player can open it as many times as he'd like, by pressing his +use key, and max out this type of ammo.

Image:Placementtip.gif 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.

Keyvalues

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.
  • Angles:

Pitch Yaw Roll (Y Z X) <angle>
This entity's angular orientation in the world.
  • AmmoType
<choices>
Literal Value Ammunition Functions
0 item_ammo_pistol No
1 item_ammo_smg1 Yes
2 item_ammo_ar2 Yes
3 item_rpg_round Yes
4 item_box_buckshot No
5 weapon_frag Yes
6 item_ammo_357 No
7 item_ammo_crossbow No
8 item_ammo_ar2_altfire Yes
Warning:Some crate models are missing, so only about half of these settings will work. If the game can't find the model for the AmmoType, the model will instead be replaced by a glowing red model saying "ERROR", and the crate will not work.

Inputs

  • Targetname:

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.

Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
  • OnUsed
Fires when +used by the player. (activator is the player)

See also

Crates for basic crates

Personal tools