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
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.