item_crate

From Valve Developer Community
Jump to navigation Jump to search
Item crate bm supplycrate01.png

item_crate is a model entity available in Black Mesa 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.

Tip.pngTip: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.

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.
Full list.
  • "canteen" - Spawns canteen related items, (water bottles, vacuum flasks, etc.)
  • "joke" - Spawns eyeballs and prank toys.
  • "junk" - Spawns a bunch of junk, (broken vent covers, locks, and other junk.)
  • "lab" - Spawns lab related items.
  • "lab2" - Spawns other types of lab related items
  • "military" - Spawns military related items, (tools, etc.)
  • "military_big" - Spawns military related items for a bigger type of crate, (Alice packs, tools, ammo crates.)
  • "office" - Spawns office related items, (copy paper, books, etc..)
  • "tech" - Spawns electronics, (motherboards, soldering irons, etc.)
  • "tech2" - Spawns a variety of electronics.
  • "cleaning_products" - Spawns cleaning products, (spray bottles, spray cleaners, etc.)
  • "paint_supplies" - Spawns paint cans and buckets.-
  • "books_small" - Spawns small amounts of books.
  • "books_large" - Spawns large amounts of books.
  • "snacks" - Spawns all kinds of snacks, (chips, candy, juice boxes.)
  • "computer_supplies" - Spawns a monitor, computer tower, and other computer supplies.
  • "tools" - Spawns tools, (pliers, wrenches, hammers, drills, etc.)
Icon-Bug.pngBug:The items that appear have several bugs, which may make you prefer to use your own workarounds with env_entity_maker and point_template.

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:

See Also