In this article we will get acquainted with the main tools of the Hammer editor, with the help of which maps are actually created.
In the picture below you can see where the main toolbar is located (by the way, the position of any editor panels can be easily changed).

The picture below briefly describes the functions of the tools and their names. We will look at them in more detail below.
More about the tools
Now it is advisable that you launch the editor and try out the actions of the tools with us.
1. Selection tool (Select Tool)

The arrow or selection tool serves several purposes. If you point this tool at any object in the editor, it will be selected (see the figure below). So far you don't know how to create objects, and your workspace is empty - return to this point after reading about the block tool (it is designed for creating objects).

If you continue to click inside the selected object, you will be able to perform some simple operations with it such as resizing, rotating and parallel shifting. Let's talk about these operations in more detail.
- a) Selector function: resizing
To change the size of an object, you need to grab it by the white squares and drag it :)
b) Selector function: rotation
Click inside the selected object 1 time to rotate it. Grab the white circles and pull.
Note: in the editor settings, on the "2D views" tab, there is a "Default to 15 degree rotation" checkbox. So, if it is standing, then the rotation will be carried out at 15°. To smoothly rotate an object, you need to hold down Shift. If the checkbox is not checked, then everything is the other way around (check it yourself).
We recommend rotating objects by 15 degrees only. The Half-Life engine does not like "freely deployed" objects; it prefers right angles or, in extreme cases, angles of 45°.
c) Selector function: parallel shift
Double-click inside an object to shift its sides parallel:
d) Selector function
: quickly create a copy of an object
You can quickly make a copy of a selected object by simply holding down Shift
, when transferring it. This is a very convenient function that significantly simplifies and speeds up the process of creating a map. It is very convenient to make walls, fences or boxes in this way: make 1 wall, and then with a clamped
Shift, copy.
Copying objects using Shift is much more convenient than using the clipboard
(Copy -> Paste), because from the buffer, the object is inserted into the origin or the center of the screen, which is often inconvenient. When copying by dragging, the object is created at the same height as the original object (in general, try it - you will like it :)
e) Selector function: Select multiple objects
This is probably not a function, but still, don't forget that you can select several objects at the same time, just hold down the left mouse button and select the desired objects with a rectangle, then release the button (see the figure below). Voila! All objects are selected. By the way, the same result can be achieved by selecting objects one by one while holding down the key Ctrl. In general, all the principles of working in Windows apply in the editor.
2. Magnify (Loop tool)

With a magnifying glass, in principle, everything is clear - it increases/decreases the scale of the coordinate grid. Clicking the left mouse button increases, right click decreases. If the object being edited is small, we increase the scale, and when, for example, you need to select several objects and they do not fit on the screen, we decrease the scale.
Let's say right away that you won't be using a magnifying glass :), because it's much more convenient and faster to press "
+" And "
–" on an additional keyboard layout. You can also use the numbers 1, 2, 3 ... 0, but this is also not convenient, so remember the "+" and "–" on the additional keyboard layout.
3. Camera (Tool camera)

The camera tool is used to create viewpoints on the map being created. Of course, you can fly around the map while editing it, but if it is large, then flying from one end to the other is a tedious task. In this case, it is easier to make several viewpoints (cameras) in different parts of the map.
Let's take a look at how viewpoints are created. For convenience, let's set the map to a top view (2d top), select the camera tool, and hold
Shift and with the left mouse button draw a line.
This is what we get:

The turquoise dot shows the position of the camera, and the red line shows where it is looking. You can make as many cameras as you like. Remember that you can only move between cameras in a 3D view when the Camera tool is selected.
By the way, you can navigate in the 3D view of the editor after pressing the "Z" button using the usual "W", "A", "S", "D" keys and the mouse.
- PageUp / PageDown — next/previous camera;
- Delete — deletes the current camera.
Make it a rule: started a new map - be sure to create at least 1 camera. This is necessary so that the overview in the 3D editor view is not reset to the origin. If there are no cameras, the 3D view will constantly move to the origin, and then you will have to fly to the edited location again to see the changes. All this applies to a configuration with 1 editing window. If you use 4 editing windows at the same time, you don't have to do everything described.
And also about installing cameras. There is no need to accurately set the camera position, accurate to millimeters or degrees, because when you move in a 3D view with the camera tool turned on, the position of the current camera also moves.
4. Entity tool (Entity Tool)

Tool
Entity Tool
used to insert point entity objects onto the map (sounds, player birth points, light sources, some types of triggers, etc.). If you don't know what an entity is, read about it in the section
"Entity".
How to insert an entity on a map?
Select the entity tool, and the cursor will change from an arrow to a hatchet:

Before we insert an entity onto the map, we need to select its type. This is done in the "New Objects" panel (the panel is located on the right). From the list of available objects, select the one you need. This list contains only point entities.

A point entity can be inserted either in a 3D view or in any 2D view. In the 3D view, you simply click on the ground or wall and the object will be inserted. It can then be moved to another location.
In the 2D view of the editor, by left-clicking we determine the location of the object, but it has not yet been created. We can move the green square (this is what the created point entity object looks like) in any 2D editing view, achieving the position we need. We complete the creation of an object by right-clicking on the green square and selecting the only item "Create object" in the menu. Or, without calling up the menu, you can click on
Enter.

Thus, all point entities (sounds, lights, sprites, etc.) are installed.
5. Block tool (Tool block)

The block tool is used to create brushes or brush entities. The earth, walls, mountains, water, cars, boxes and even the sky - everything is created by this tool. If for some reason you don't know what a brush is :), read about it in the article
Basic Mapmaking Terms.
When you select a block tool, the cursor changes to a frame:

To create a regular rectangular brush (wall, box, floor), you need to hold down the left mouse button, set the size of the rectangle, and release the button. Brush is not ready yet (similar to the creation of a point entity object). Now we can change the size of the future brush and set its position.
Then, as in the case of point entities, right-click (inside the brush being created) and select "Create object" from the menu, or click instead
Enter (see picture below).

Brush is ready! Brushes are painted in different colors. Grouped brushes are painted with the same color (we'll talk about grouping objects a little later in this article). To turn a brush into a brush entity object, you need to click
[Ctrl-T] and select the required object type from the list (everything is the same as in the case of point entity objects, only different tools are used).

Naturally, no one forbids us to change its shape or move it after creating a brush - this goes without saying.
6. Texture application (Applying textures)

A tool for applying textures, i.e. for coloring the map. When you select this tool, the cursor changes to an arrow with a bucket (see figure below).

You can get all the necessary information about texturing objects from the fourth section of the Tutorial - "Textures and Decals".
7. Apply Texture

This tool is used to paint all sides of an object with the selected texture at once. For example, we selected a box and the texture of the box, we paint over one side of the box with this tool, and all the others are also painted over.
Let's say right away that there is a much more convenient way to paint all the edges of an object at once. Select a regular tool for painting (the sixth one in this review), hold down
Shift and paint only 1 side - all the others are also painted over.
8. Decals (Applying decals)

The tool is designed for applying decals over regular textures. Let us remind you that decals are also textures, but they can be applied on top of regular ones. Bullet holes on the walls, traces from grenade explosions - these are all decals.
You can get all the necessary information about decals from the fourth section of the Tutorial - "Textures and Decals".
9. Clip tool (Clip Tool)

Tool
Clip used to cut objects into pieces. The operation of this tool is described in detail in the article.
Clip Tool: Cutting Objects.
10. Vertex Manipulation (Vertex Tool)

Tool
Vertex
used to change the shape of objects by changing their vertices. For example, a cube has 8 vertices, if we connect the 4 top vertices to one point, we get a pyramid. This tool is indispensable when creating mountains, tunnels, and generally more complex objects than simple blocks.
The operation of this tool is described in detail in the article.
Vertex Manipulation: Changing Object Shapes.
11. Path (Path Tool)

The Path tool is designed to create trajectories for monsters. There are no monsters in CS, so we won't dwell on it in detail.