Example HalfLife 2 Deathmatch Map & Hammer Tips n’ Tricks

This is one of my first maps with which I learned how to use Hammer, HalfLife 2’s map editor. However the real milestones and pieces from which you can benefit from are:
– contains a working teleporter
– contains 3 buttons to play external mp3’s (mp3’s not included)
– working ladders
– emulated tubes/tunnels using connected cylinders (no subdivision… didn’t know it at the time, hehe, not a 3D guy)

Getting Sounds to Work

To get the sounds to work, they must exist at the server’s hl2 root folder in a folder called “sounds”. This folder is the [root] that the “ambient_generic” entity uses. I put a folder in there called “music”, and put my mp3’s in there. Then, I just type in “music/1.mp3” in the Sound Name parameter. It’s a bitch, I know. It should be compiled with the map, frankly.

Example from my machine:

C:\Program Files\Valve\Steam\SteamApps\jesterxl\source dedicated server\hl2\sound

And then with the mp3 linked:

C:\Program Files\Valve\Steam\SteamApps\jesterxl\source dedicated server\hl2\sound\music\1.mp3

…keep in mind this is for Dedicated Server, to hear it when you compile your map, I put mine in:

C:\Program Files\Valve\Steam\SteamApps\jesterxl\half-life 2 deathmatch\hl2\sound

Got your PHD in HalfLife2 folder configs? Geez… I sure hope I get used to this. What a lot of work just to play custom sounds.

Making A Teleporter

When I purchase a Captivate license, I’ll put a better tut, but this one is better than the frikin’ one out there that missed a very important detail… or 2.

1. Make sure on the Source SDK the settings are set for HalfLife2: Deathmatch
2. Open Hammer, create a new map via File New
3. Select the Block Tool (it’s the box looking icon on the left)
4. Click and drag in the top view to make a box
5. In the “Categories”, it’ll probably have “Primitives” selected. Good. The “Objects” below it should have “block” selected. Once there, right click in your box and choose “Create object”, or just put the cursor in the middle and hit enter.
6. Select the “Selection Tool”, the red arrow on the left. Make sure your box is selected; you can tell it is because it’ll be red outlined with the white squares around it (resize handles)
7. Hit Control + T, OR go to Tools > Tie to Entity.
8. In the new dialogue, the “Class” will probably say “func_detail”. Change that to say “trigger_teleport”.
9. Give it a name; I usually suffix things to what they are, such as “myTest_tele”. The name text will appear in red; once you hit apply, it should turn black.
9b. People will typically go to the texture browser, type in “tools” as the filter, and select the “Trigger” texture. This is a best practice, and has no effect on the operation of your teleport itself; it DOES render it invisible, though, which is good; you can then draw real geometry to actually “look” like your teleporter.
10. Select the entity tool the golfball no a tee looking icon above the box (block tool). In the “Categories” off to the right, it should say “Entities”. In the “Objects”, make it say “point_teleport”. Click in one of the camera viewport, the black window in the top left, to create it.
11. You’ll know your successful when you see the red box. Select the Selection tool, and select the newly created box. Hit ALT + Enter on your keyboard.
12. Give it a name like “my_tele_dest” meaning “My teleport destination”. After hitting apply and closing the dialogue, select the Selection tool.
13. Highlight your teleport trigger entity, and hit Alt + Enter. Select “Remote Desitination” and select your teleport point from the dropdown list to the right. Click apply.
14. That’s it! One thing I do is, while still on the dialogue above, click the “flags” tab, and click the “everything” checkbox; that way you can drive a car into it, and it’ll get teleported too.

Tips & Tricks Using Hammer

Some quick tips on using Hammer, heed it or suffer:
– go through the “Your First Half-Life 2: Deathmatch Room” tutorial, it gives you all the basics; just don’t get too close to the terminology of brushes and such. I reckon Hammer is used for other games, the slang of “brush” and “entity” get blurred when people start referencing it on websites.
– save your file before a large compile; the old school way of appending “_01” to your filename is works great. The reason for this is, since Hammer is so unstable (at least for me), if it crashes and corrupts your map, it’s ok because you just saved to a new file, so you can revert back to your last saved. Or you could just use source control like Subversion/CVS…
– when compiling, and your experiencing problems, just compile the map BSP, but ignore the other 2 (VIS and RAD set to “no”). For some reason re-making the BSP makes it not crash.
– If it does crash whilst loading up in Deathmatch, just wait till you hear the “bonk” Windows sound THEN hit ALT+F4… you’ll wait years otherwise if you try to abort the crash by hitting ALT+F4 or Control + Alt + Delete yourself. Just wait patiently for the end to come, it’s quicker that way.
– Accidentally rendering VIS or RAD? They are actually seperate programs so of you Control + Alt + Delete, and find the prog using 100% of your CPU, as long as it’s not Hammer, you can force close it, and your map will be ok… it probably won’t run though.
– Some things such as “trigger_teleport” are not in the entities/objects list… don’t fret, you actually have to make a model/piece of geometry/”brush” first, then associate it to an entity via Control + T, or “Tools > Tie to Entity” with the brush selected. THEN, in the dropdown you can use the dropdown/editable combobox to select the entity your looking for.
– don’t expect much from the tutorials if your from the Flash world… they could use some… help, hence me starting to write stuff like this. Have patience, and dig. It’ll typically take you 4 times longer to find what your looking for than it would for Flash stuff… course, I’m subjective and maybe I’m just not good at using Google + Firefox tabs. Anyway, patience is the key during your searches.

My Map & Other Example Maps

JXL Tubes Deathmatch – VMF, BSP, & TXT in ZIP

Good example maps here can be found here

For da n00bz:

VMF = a map source file you can open in Hammer
BSP = a compiled, playable map for HalfLife2’s Source engine
TXT = the text that the intro screen shows. You should, however, edit the motd.txt in the root of the server; it supports true HTML & CSS, I reckon b/c they put an IE/browser instance over the intro screen. However… that’s global for the server. I know, stupid… hopefully they’ll update it so each map can have it’s own intro screen.

12 Replies to “Example HalfLife 2 Deathmatch Map & Hammer Tips n’ Tricks”

  1. hey man

    if i’m not mistaken, you can get the deathmatch (and standalone) server to send your MP3s with your map by making a resource file (.res) that goes in the same folder as your map.

    this res file has an entry for each resource you want to have downloaded – i put a ton of custom textures in for my map. i’ve done it locally with MP3s too.

    btw – you should email me and i’ll send you my server info. i didn’t realize any flashers were playing HL2 (or making maps!)


  2. also, co-workers and myself set up hl2mod.com to have these types of tutorials – which are definately lacking in this community. if you want to write tuts there, i can set you up an account. or i can just point folks to your posts here, if you prefer.

    btw – some of the horrible Hammer crashing issues are due to leaving the SDK launch window open in the background. once you launch Hammer, close the SDK window. i’ve not had many (if any) crashes since i learned that little trick.


  3. oh – and finally – there’s a tool now in the SDK called ‘bspzip’ that _apparently_ lets you package textures and sounds with your bsp… however, there’s no instructions, help file, or any reference online. but in theory, you should be able to package your sounds with your map this way.

    ok – i’ll stop posting.


  4. helpfull info both of u thankfully there are some ppl out there willing 2 help morons like me. kudos both of u

  5. Quote:

    T’his folder is the [root] that the ‘ambient_generic’ entity uses.’

    I’m a Flasher too! Anyway, where do I access this ‘ambient_generic’ variable? Do I stick it in my server.cfg file?

    Also, I’m having trouble knowing the difference – and indeed accessing – the two different consoles. Where can I find a nice list of commands to enter in the Steam Source Dedicated Server Console Panel. And finally, is this the same as the in-game console and the RCON console?

    There’s a surprisingly small amount of literature on this.

    Many thanks in advance.



  6. Sorry Sonar, don’t know. I wrote this entry about 16 months ago, and it’s been that long since I have messed with the tools.

    If memory serves, I think ambient_generic was the entity you actually put somewhere in your world, and when you compile your map, all ambient_generics sounds in the map look in that folder for the sounds they are supposed to play. Hope that helps!

    As far as consoles and commands, I just dug on google and found a few; I know, not very helpful, but all the documentation I found about most of the lower level stuff was community driven. It’s been over a year since then, so maybe there is more.

  7. Hi we’re 2 guyz just started to make source maps ( bout 2 weeks mappings tho) and i did all the instructions for the teleporter but i cant see the teleporter itself…what did i do wrong…:S?

  8. You don’t actually ‘see’ the teleporter, it’s invisible.

    What I do is position it in front of, or inside things, to make those objects a teleporter. That way, you can design whatever you want to teleport. It could be a floor, inside a ball of light, a car… whatever!

  9. Where do I get a map tool so I can make CSS maps? I have Hammer 3.4, but I can only make 1.6 map:( help please?

Comments are closed.