Configuring Hammer for the First Time
I also recommend creating a shortcut with hotkey to the Hammer editor. The first time you startup Hammer, you should do it the long way--via Steam.
So if you have never opened the Hammer editor before, you need to load Steam first (if it's not already loaded, of course). After the Steam game menu pops up, double-click on
Source SDK under TOOLS. Wait a few seconds for the SDK menu to load up.
Near the bottom of the SDK menu, you should find a drop-down selection that's labeled "Current Game:". Select "Counter-Strike: Source" as your game. You only need to do this once if you only map for CS:S. The editor will remember this preference the next time it starts.
 Setting the current game for Hammer |
Under APPLICATIONS, double-click on Hammer Editor. It should be the first item in the menu. If everything goes well, Hammer should load in a few seconds. The new version of Hammer (version 4.0) automatically configures itself and loads up the appropriate resources for CS:S (that's why it's necessary to indicate "Counter-Strike: Source" from the Steam SDK menu). If something goes wrong with your configuration, I'll troubleshoot with you in the
debugging section of the tutorial.
I am not going to discuss mapping just yet in this tutorial, so just close Hammer again without doing anything interesting in the editor. I know, I am such a tease.
Activating the Console
If you haven't activated the console from within the game yet, you need to do that in order to load any custom maps you made.
Fire up CS:S, and from the OPTIONS menu, select the "Keyboard" tab. Toward the bottom of the "Keyboard" tab, click on the "Advanced..." button. Check the "Enable developer console (~)" option, and cilck OK.
From now on, whenever you press the "~" key in CS:S, the console will pop up. Pressing the "~" key again will close the console.
Working with Console
Now, let's bind an useful key from the console. This will be important later to assess the performance of your map. After bringing up the console, type:
bind <your key> +showbudget
Let's load up an existing official map for practice. Type:
map cs_office
You'll notice that the console is cleverly programmed to autocomplete the map's name. In fact, if you have a custom map compiled, the name of your custom map would be listed in the map selection. It's a real time-saver.
If you encounter an error message when attempting to load the map, read this FAQ.
Once cs_office is loaded, walk around in it while pressing <your key>. It's the same key that you've bound to +showbudget earlier. You should see a complicated bar graph, showing the various resources being used by the map. It's updated real-time, and it gives the mapper a very good idea how to optimize their maps if performance is an issue. This will be very important later, when we
discuss optimization in the advanced topics.
So now we've gone through the necessary but boring stuff. Let's make some maps! Start with the tutorial
Making Your First Map in Counter-Strike: Source.