Crate

From Valve Developer Community
Jump to: navigation, search

Basic

A basic crate is just a prop_physics with World Model set to a crate model. For multiplayer mapping, use prop_physics_multiplayer to reduce server strain. Crates, by default, are destructible and movable but do not contain items. Do not overuse crates. Most games contain far too many of them.

Normal crate models in HL2/HL2DM:

  • props_junk/wood_crate001a.mdl: The basic cubic crate. Two skins.
  • props_junk/wood_crate001a_damaged.mdl: Beat-up version of the previous. Two skins.
  • props_junk/wood_crate001a_damagedmax.mdl: Even more beat-up version of the previous. Two skins.
  • props_lab/dogobject_wood_crate001a_damagedmax.mdl: Same as previous but with health=1.
  • props_junk/wood_crate002a.mdl: Double-wide version of the basic crate. Two skins.

The easiest way to make a crate unbreakable is to set its "Min Damage To Hurt" property to a very large number.

To make a goody crate (aka ammo crate—the kind where you find health kits, ammo, etc), use an item_item_crate. You can choose what you want the kit to contain using the "Item Type" property in Hammer.

For infinite-ammo bins, use item_ammo_crate. Note that not all ammo types work. See the entity's article for details.

Immovable

An immovable crate can be created by selecting the Motion Disabled flag in the Object Properties. These are less realistic, as they will not be moved by physics forces.

Blank image.pngTodo: respawning

Stub

This article or section is a stub. You can help by adding to it.