Crate: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
How to create crates in HL2.
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 destroyable and movable but do not contain items.
 
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 destroyable and movable but do not contain items.


Normal crate models in HL2/HL2DM:
Normal crate models in HL2/HL2DM:

Revision as of 04:45, 6 February 2007

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 destroyable and movable but do not contain items.

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.

Todo: immovable,respawning

Stub

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