item_crate
Jump to navigation
Jump to search
Tip:Commonly used models for the item_crate are models\props_generic\bm_supplycrate01.mdl, models\props_generic\crate_48x48.mdl, models\props_blackmesa\tarp_crate.mdl, and models/props_generic/bm_supplycrate01.mdl.
Bug:The items that appear have several bugs, which may make you prefer to use your own workarounds with env_entity_maker and point_template.
item_crate
is a model entity available in Black Mesa. It's a physics prop that can be configured to spawn junk preset and entities when broken. Used in the game for crates with books, toys, electronics, snacks, tools, laboratory items, military items. It is also used for crates with useful items for the player, it is usually batteries and healthkits. Most inputs, outputs and properties are same as CPhysicsProp.
Represented by class CItem_Crate
.

Keyvalue
- Spawn on break (spawnonbreak) <string>
- Spawn entities using a comma (or space) separated list. For example: "item_battery,item_grenade_mp5,item_weapon_mp5".
- Script Preset (scriptpreset) <choices>
- The preset props that will fall out of the crate upon breaking. Spawn entities using a section from proplist.txt, you also can add your own by editing the file.
|

In Steam versions but not in the mod version:
- Can't be picked up.
- Doesn't collide with dynamic models and most brush entities.
- Disabled motion after a few seconds.
- Disappear after save reload.
In the mod version only:
- Disabled motion after save reload.
- Crash on save reload if was picked up.
In both versions:
- Doesn't work with level transition.
See Also
- item_ammo_crate - metal crate with ammo for weapons