Prefab

From Valve Developer Community
Revision as of 03:48, 2 April 2006 by Jupix (talk | contribs) (such a long article.. and it all can be said in four paragraphs)
Jump to navigation Jump to search

A Premade Fabrication or Prefab is a separately saved object, usually consisting of multiple parts. The prefab system allows you to easily store pieces from your levels that can be used over and over. Examples of useful prefabs include hallways, pillars, special entity setups, etc.

Prefabs are simply small map (.VMF) files that contain only your prefab. These files are stored in a particular folder, the prefab folder, so that Hammer can find them and allow you to easily insert them into your levels.

To create a prefab, select the objects you wish have in it and select the Create Prefab command from the Tools Menu. Hammer opens a Save As... dialog open in the Hammer prefabs directory. Type in a name and click the Save button. The prefab will now appear in the New Objects toolbar.

Note.pngNote:When creating prefabs, it is generally advisable to centre the objects at the origin (0,0,0) before finalising the prefab.

For information on how to place prefabs in a map, see Inserting Prefabs.

External links

Various sites that host custom made prefabs and models: