In this article we will learn how to create the simplest objects on the map, insert entity objects, and create prefabs. The article is quite long, with a lot of pictures, so be patient and read it carefully. As practice shows, novice mappers have a lot of questions when creating simple objects and performing the simplest operations on them. This article answers many of these questions.
Content:
Let's select the top view and, holding down the left mouse button, set the size of the rectangle, say 256x256 units and release the button. The object is not ready yet.
Let's switch to a side view or front view (it doesn't matter) and increase the height of our object to 256 units.
Now that the position of the object and its dimensions are set, all that remains is to hover the cursor over the object, press the right mouse button and select the only option "Create object".
Let's see how it will look in the game, for this we will select the 3d textured view.

The brush in the form of a cube with dimensions of 256x256x256 units is ready. Now we can replace and align the textures on it, as well as move it to any place on our map, change the size, shape, etc.
Note: the size of the created or selected object is displayed in the help line at the bottom of the screen (see figure below).
Point entities are inserted onto the map using the tool Entity Tool [Shift-E]. To create a brush entity, you first need to make a brush and then turn it into an entity. Example, a door. Create a brush shaped like a door and turn it into a func_door object. The transformation is carried out by a keyboard shortcut [Ctrl-T].
You can read more about entity objects and their properties in the section "Entity".
Let's look at the creation of these two types in more detail.
Now let's turn our attention to the right side of the editor's working field. There is a New Object panel (highlighted with a blue frame).
You can pull out this and any other panel as shown in the picture on the right.
In line Objects we select the type of point entity we want to insert into the map. By default, the list contains info_player_start (i.e., the birthplace of the contra). You can change the default entity type in the menu Tools > Options... > Game Configurations (see picture below)
In line Default PointEntity class the point-based entity is installed by default, and in the line on the right, Default SolidEntity class
the brush-based entity is installed by default.
Next on the list Objects select the required entity type, for example light (light source).
And insert it onto the card.
As a result, our light source will be depicted as a small purple rectangle.
Now, if necessary, we can move our entity to another location and also change its properties. To do this, select the entity and press the right mouse button. A menu will appear with various options (picture on the right): copy, delete, group, etc. We are interested in the last line
Properties. We advise you to remember the shortcut keys for object properties [Alt-Enter].
You can turn brushes into brush entities and entities back into brushes using the buttons on the "New Object" panel. Button toEntity turns a brush into a brush entity object, button toWorld turns a brush entity object into a brush (i.e. the reverse operation).
In the window that appears, we must indicate the type of entity object (select it in the list), then we can change its properties, what goes under the word Attributes.
Selecting the entity type.
In addition to entity properties, you can set various flags (Flags tab). There are different flags for different entities. There may not be any flags at all.
Hammer comes with 5 libraries with prefabs: computers (computers), crates (boxes), old stuff (sofa, several armchairs), random objects (trash, sofas, safes, etc.), usable objects (spotlight, first aid kit, etc.)
In order to insert a prefab onto the map, select the Block Tool [Shift-B], then in the panel New Objects in line Categories Let's choose one of the prefab libraries, for example, computers.
In the line below ("Objects") we select a specific instance of the computer, for example, Green Computer. Now click on the button Insert original prefab.

The prefab is placed at the origin when viewing in 3D view, or at the center of the screen when viewing in 2D view.
You can also create your own prefabs. To do this, select all the objects that will make up the future workpiece and in the panel New Objects click the button Create Prefab
In the field Name indicate the name of the prefab in the field Description You can write additional information about the prefab (for example, its dimensions), and in the field Create in
You select the library in which to save the workpiece.
If you do not want to save your prefab in standard libraries, you can create your own. To do this in the menu Tools select item Prefab Factory...
Then click the button Add Library, specify the name of the library, you can also enter a description for your library.
Now, when creating your own blanks, you can choose to save your library. For example, we made a kitchen table template and now save it in the My_Prefabs library.
This concludes the article on creating objects on the map.
Content:
- Creating a brush
- Creating a point entity object (point-based)
- Creating a brush entity object (brush-based)
- Inserting and creating prefabs
1. Creating a brush
To create a regular brush, you need to select the Block tool [Shift-B] and the cursor will change to a frame (see figure below)
Let's select the top view and, holding down the left mouse button, set the size of the rectangle, say 256x256 units and release the button. The object is not ready yet.
Let's switch to a side view or front view (it doesn't matter) and increase the height of our object to 256 units.
Now that the position of the object and its dimensions are set, all that remains is to hover the cursor over the object, press the right mouse button and select the only option "Create object".
Let's see how it will look in the game, for this we will select the 3d textured view.

The brush in the form of a cube with dimensions of 256x256x256 units is ready. Now we can replace and align the textures on it, as well as move it to any place on our map, change the size, shape, etc.
Note: the size of the created or selected object is displayed in the help line at the bottom of the screen (see figure below).
2. Create an entity
All entities are divided into point-based entities, for example, light and sound sources, some types of triggers, players' birthplaces, etc., and brush-based entities, for example, triggers, buttons, doors, elevators, etc.Point entities are inserted onto the map using the tool Entity Tool [Shift-E]. To create a brush entity, you first need to make a brush and then turn it into an entity. Example, a door. Create a brush shaped like a door and turn it into a func_door object. The transformation is carried out by a keyboard shortcut [Ctrl-T].
You can read more about entity objects and their properties in the section "Entity".
Let's look at the creation of these two types in more detail.
2.1. Creating a point-based entity object
Select the Entity Tool [Shift-E] and the cursor will change to a hatchet (see figure below)
Now let's turn our attention to the right side of the editor's working field. There is a New Object panel (highlighted with a blue frame).
You can pull out this and any other panel as shown in the picture on the right.In line Objects we select the type of point entity we want to insert into the map. By default, the list contains info_player_start (i.e., the birthplace of the contra). You can change the default entity type in the menu Tools > Options... > Game Configurations (see picture below)
In line Default PointEntity class the point-based entity is installed by default, and in the line on the right, Default SolidEntity class
the brush-based entity is installed by default.Next on the list Objects select the required entity type, for example light (light source).
And insert it onto the card.
As a result, our light source will be depicted as a small purple rectangle.
Now, if necessary, we can move our entity to another location and also change its properties. To do this, select the entity and press the right mouse button. A menu will appear with various options (picture on the right): copy, delete, group, etc. We are interested in the last line
Properties. We advise you to remember the shortcut keys for object properties [Alt-Enter].2.2. Creating a brush entity object
To create this type of entity, we first need to make a brush, and then, having selected it, select in the context menu Tie to Entity or press the keyboard shortcut [Ctrl-T].You can turn brushes into brush entities and entities back into brushes using the buttons on the "New Object" panel. Button toEntity turns a brush into a brush entity object, button toWorld turns a brush entity object into a brush (i.e. the reverse operation).
In the window that appears, we must indicate the type of entity object (select it in the list), then we can change its properties, what goes under the word Attributes.
Selecting the entity type.
More information
It should be noted that at any time you can change the type of an entity. To do this, select it and click [Alt-Enter] or select from the context menu Properties.In addition to entity properties, you can set various flags (Flags tab). There are different flags for different entities. There may not be any flags at all.
3. Creating and inserting prefabs
As you already know, a prefab is a template consisting of one or more objects for quick insertion into a map (for example, a chair, a bookshelf, a lamp, a box, etc.). Prefab libraries are stored in files with the *.ol extension in the "Hammer\prefabs" directory.Hammer comes with 5 libraries with prefabs: computers (computers), crates (boxes), old stuff (sofa, several armchairs), random objects (trash, sofas, safes, etc.), usable objects (spotlight, first aid kit, etc.)
In order to insert a prefab onto the map, select the Block Tool [Shift-B], then in the panel New Objects in line Categories Let's choose one of the prefab libraries, for example, computers.
In the line below ("Objects") we select a specific instance of the computer, for example, Green Computer. Now click on the button Insert original prefab.
The prefab is placed at the origin when viewing in 3D view, or at the center of the screen when viewing in 2D view.
You can also create your own prefabs. To do this, select all the objects that will make up the future workpiece and in the panel New Objects click the button Create Prefab
In the field Name indicate the name of the prefab in the field Description You can write additional information about the prefab (for example, its dimensions), and in the field Create in
You select the library in which to save the workpiece.If you do not want to save your prefab in standard libraries, you can create your own. To do this in the menu Tools select item Prefab Factory...
Then click the button Add Library, specify the name of the library, you can also enter a description for your library.
Now, when creating your own blanks, you can choose to save your library. For example, we made a kitchen table template and now save it in the My_Prefabs library.
This concludes the article on creating objects on the map.
In the field Faces we can specify the number of side faces of the cylinder ranging from 3 to 32. The more there are, the rounder our cylinder will be.
In the top view, in the right-click menu, select Create object. The cylinder is ready.
Now let's explain why in the options you need to check the box next to
Reorient Primitives on
creation... It's easier to explain with a picture.
If we were to use the command
Create object
in the form of front, then our cylinder would be inscribed in a rectangle with sides 64x80. If this checkbox is not checked, then the position of the cylinder will not depend on the selected view and the cylinder will always fit into the rectangle in the top view.



Wall width


Next, without releasing the left mouse button, draw a line along which our brush will be cut. To complete the operation, click Enter.
Thus, we divided the wall into 2 parts.
So when you click on [Shift-X] 3 modes of cutting an object alternate: both parts are preserved or one of the parts remains.
You can also cut several objects at the same time. To do this, you need to select them all and then apply Clip as usual.
Practice cutting various objects yourself.
Now let's cut a through hole for the window in this brush. To do this, you need to create another brush, which will correspond in size to the future window, i.e. the length and width of this brush should be equal to the length and width of the future window. This brush should be placed exactly in the place where the window will be. Please note that in the top view (2D top) the new brush is thicker than the first large brush. This is done so that in three-dimensional form it is convenient to select this brush (and this will be required).
Switch to 3D textured view and you should end up with something like this (see picture below).




This window asks what wall thickness you want to give the cube. Thickness is measured in units. Leave the default value of 32. Click OK. What happened? The cube from one brush turned into 6 separate ones that create an internal space (cavity). So we ended up with something like a room. The thickness of the walls of the room is 32 units, as we indicated. The figure below shows how our object will look in the top view after Hollow.
The division of the cube is clearly visible in the 3D wireframe view (right).
Vertexes (vertices) of objects in the 3-D view of the editor are depicted as white dots, and edges as yellow. The yellow dots are placed in the middle of the edge.
Such a brush will cause an error during compilation! For the Half-Life engine, a prerequisite is that ALL points forming it are in the same plane.
Now instead of one plane we have 2.


In 3-D form it looks like this:
During compilation, this error does not always appear (the map can be successfully compiled to the end), but in the game the brush will have an incorrect shape, some of the edges may disappear (as happens with error No. 1).
In the first mode, you can move both the vertices and edges of an object;
In 3-dimensional form Step 3 (creating a new edge between two points) looks like this:

Always answer "YES" to this question. It is difficult to imagine a case when you need to answer "NO"... Moreover, if you answer no, you will receive an error during compilation
"Plane with no normal". Above we briefly described what its essence is, you can read a little more information about this error

...it's better to create one large one with a truncated corner (see figure below).
On any sufficiently large map you can find dozens of places where it is possible to use one large brush instead of 2-3 small ones - this technique allows you to reduce the overall map compilation time (since there are fewer brushes) and sometimes reduces r_speeds, which accordingly leads to an increase in fps.
Close the texture selection window. Set the top view (2D top), select the Block tool
[Shift-B]
and build a square with dimensions of 384x384 units (control the size in the status bar, below). Switch to 2D front view and lengthen the rectangle to 384 units as well. Finish creating the brush by pressing Enter.
Select the brush you just created and click [Ctrl-H]
. Now we will use the Hollow function discussed in the previous article. In the window that appears, leave the value 32 and click "OK".
Now you can look at the map in 3D textured form and fly inside the room. To move around in the 3D view, press Z once and use the W, A, S, D buttons and the mouse. As a result of all operations, your room in three-dimensional form should look something like this (see figure below):
Switch to 2D front view and place the light object under the ceiling (see figure below). Then press Enter to finish creating the light source.
So, we made a light bulb. Now it will be light on our map. Now all that remains is to create spawn points for counters and terrorists. As you already know, these points are the objects info_player_deathmatch (terrorist) and info_player_start (counter). One object - one birth point. In order for several players to play on the map, it is necessary to place several points for counters and terrorists.
Please note that the info_player_deathmatch and info_player_start objects should not touch the walls (see the figure below, top view), each other and be raised some distance above the ground (see the figure below, front view). This must be done so that players do not die at the beginning of the round on their own and can move freely. Have you noticed on some maps, with high ping and lag, how players seem to fall to the ground at the beginning of the round? This happens precisely because there is some distance between the player and the ground. With a high-quality connection, such "landings" are almost unnoticeable.
So, we have already placed one terrorist birth point. Now create one contra spawn point in the same way. Select the info_player_start object from the list and insert it in a similar way, only in the opposite corner of the room (in the top view it will be the lower right corner).



As you can see from the picture above, by default at birth the player always faces to the right in the overhead view (0°). Imagine if the main passage is on the left, then the player will be forced to turn 180° at the beginning of each round, which is quite tiring and does not allow him to concentrate on buying weapons. In such cases, it would not be superfluous to indicate the angle of the viewing direction (as shown in the figure above).
The first parameter "Weapon_Buying" indicates which team can buy weapons; by default, both teams can buy weapons (leave it unchanged).
There is only one parameter "Team", its values can be All teams (any of the teams), Terrorist (only terrorists), Counter-Terrorist (only counters). Naturally at the object
func_buyzone on the base of counters you must select Counter-Terrorist, and for terrorists - Terrorist.
The first "Pitch Yaw Roll" is nothing more than the direction of the hostage's "gaze". It is easier to display it in a black circle, focusing on the top view (2D top).



Now somewhere closer to the terrorists you need to place weapons, grenades and body armor. This is done by a point object armoury_entity
. One such object inserts one weapon, one grenade, or one body armor onto the map. But in the properties of this object you can specify their number, for example, five AK-47 or 4 HE grenades.
The "Item" parameter indicates the type of weapon, type of grenade or body armor. In the "Count" parameter - the amount of selected equipment.