A beginners tutorial which covers learning the tools of the hammer editor, building a room, texturing the room, adding in a info_player_start, learning how to light our room properly, adding in a npc_zombie, adding a static prop, adding weapon, compiling map and finally testing your map.
Posted by BeginnersMod on Nov 15th, 2008
My assumption in this tutorial is you have just opened the hammer editor for the first time and are trying to learn how to make yourself a fully functional room. Part 2 of this tutorial can be found here.
We will be:
Ok first I will go over the most commonly used tools:
The first tool on the bar is the selection tool. The hotkey for this tool is Shift+S. This tool allows you to select object such as brushes or props inside of your editor.
The second tool on the bar is the magnify tool. The hotkey for this tool is Shift+G. This tool allows you to zoom in on the selected view port to where ever you clicked.
The third tool is the Camera tool, this tool is very important if you want a 3D viewport. Select this tool, click and drag in your view port, and you will now have a camera you can navigate with. The hotkey is Shift+C
The fourth tool is the Entity tool, this tool is one of the most important tools you will use, this tool allows you to add important things into your map such as lights, player starts, weapons and the list goes on.
The fifth tool is the most important tool you will use. This tool is the Block tool. Select this tool to add walls/rooms to your level. Just click and drag in your viewport . The hotkey for this tool is Shift+B
The sixth tool is the Toggle Texture Application tool. This tool allows you to add textures to individual walls within your map. This tool has many different features such as texture scaling, texture shifting, rotation, lightmap scale, and even the very handy displacement tool which I will get more into in later tutorials. The hotkey for this tool is Shift+A
The seventh tool is the Apply Current Texture tool. This tool is a fast way to apply one texture to an entire brush or block within your map. If you click this tool it will apply a texture to the brush you have selected. There is no hotkey for this tool.
The eighth tool is the Apply decals tool. This tool allows you to apply certain things like textures but not textures. These are called decals. The sort of things I am talking about is blood trails or spray paint to make your map feel realistic. The hotkey for this tool is Shift+D
The ninth tool is the Apply Overlays tool, I will explain this tool in later tutorials. The hotkey for this tool is Shift+O
The tenth tool is the Clipping tool. This tool is used for clipping parts of brushes off. This tool is used a lot for door ways/windows and also for rounding edges.
Last but not least, the Vertex Manipulation tool, this tool is great for creating interesting architecture in your map. Just click this tool and drag the yellow corners to where ever you desire. The hotkey for this
Ok now that you know about the important tools and hotkeys. We will start building our room.
Above you will see 4 screens, those are called view ports. Each viewport is used for something different (Top, Side, Front, Bottom, 3D)
Select the Block tool and drag a box in your top right view port, this view port is called the "Top" view port
I made my brush 256x256. You can make your brush what ever size you want to make it. But I am going to keep mine at 256x256.
In the "Side" view port please make your height 128 units high. This is the standard height for Half life 2.
Press the enter key on your keyboard when you are happy with the size of your brush and it will now create it.
Now take the Camera too and drag it in the top view port to make a camera. You should now see your brush in the top left view port. This view port is called the 3D view port or "Camera"
To navigate this view port press the "Z" key and use W,A,S,D keys to navigate it.
It should now look like this:
Ok so now you are probably wondering "Well, I got a box... but how is this a room?" Well we are going to change that right now.
Press CTRL+H to bring up the hollow tool. This tool will make your box hollow in the inside so that you can run inside and outside of it. Set your value to something around -4. Negative values make the walls push outwards there for not affecting the size of the inside of your room.
(Sorry for the quality of this picture. I don't know what happened)
You now should have something like this on the inside.
Ok now it is time to put some textures in our room.
Select the Toggle Texture Application too and then click "Browse..."
you will now get something like this come up:
On the bottom where it says "Filter:"
Type in something like "Plaster" scroll through until you find a texture you like and want to use on your walls.
I used the texture called plaster/plasterwall005c (Feel free to copy and paste that into the filter and use same one.)
Ok now select the wall you would like to apply it to and click "Apply." To select multiple walls hold down control key (ctrl) and click all 4 walls.
Your room should now look like this:
ok now it is time to do the floor. Follow the steps from before except type something different into the filter. I used the tile called brick/brickfloor001a. Your room should now look like this:
Ok it is now time to change the ceiling. Again repeat the steps from above but this time change the search to something like concrete. I used concrete/concretefloor026a. Your room should now look something like this:
Ok so there are 2 things you NEED to have in order to run a map:
So lets add them then. First click your Entity tool and on the right you will see a box which shows you what Entity you have selected and ready to go into your map.
As you can see by default you start with the info_player_start entity selected. So now all you have to do is click on the ground in your room.
Your room should now look like this.
We now need to add a light. So on your Entities box again click Objects and a drop down menu should appear. Press the "L" key on your key board and the first thing that should come up is light. Press enter and now you have your light selected. Again click anywhere on the floor and you will see a light bulb appear. This is actually what is going to light the room. In our other view ports move the light around until it is in the center of the room and closer to the ceiling.
You should now have it looking like this. Ok so now we need to add a light prop so that it appears the light is coming from a source. Go to the entities box again. Open the drop down menu again and type in "prop_static" place this on the map and in the 3D view port and select the selection tool, double click on the static_prop box so that a window pops up.
Click on "World Model" like in the picture above and then click "Browse..."
this will pop up. It is called the "Model Browser"
here you can select any prop from HL2 and put it in your map. For now we are going to type "light" into the filter and select the model we want to use.
For this I chose "models/props_c17/light_domelight02_on.mdl"
Put this prop on the ceiling above your light model.
Your room should now look like the picture above. If you need to change your grid size to place your prop in the right size use the "[ ]" keys.
Ok now we are going to add an npc_zombie.
Click the Entity tool and open the drop down list again. Type in npc_zombie and press enter. Click anywhere on the floor in the map and there's your zombie.
Ok now we need to add a weapon to fight this zombie with. So repeat the same steps as above but instead type in "weapon_crowbar"
And click beside your info_player_start to put it down.
Now we need to compile our map.
Click the "Run Map!" button on the top tool bar (or press hotkey F9)
save your map to whatever you want to call it, I will save mine to mymap1
After you save it a window will pop up:
keep everything the same and just click "OK"
your map will compile and when its done you can open halflife 2 press "~" to open your developers console if that dosnt work you must to to option and allow developers console,type in map and then type in your file name for example I would type in:
press enter and your map will load. ENJOY!
Thank you for reading this tutorial, I hope you learned a few things about mapping and the hammer editor. Read on for part 2. This tutorial was written by Intermission (Andy)