Gordon Wakes Up
This tutorial will teach you how to make it look like the player is waking up at the beginning of your level. I know other tutorials exists, but they are terrible because they are either outdated or include a whole lot of crap you don’t need (like teleporters) or are sketchy on details. Hopefully this should help you out.
This tutorial requires that you know the basics of Hammer, including brushes, entities, entity I/O (inputs and outputs), and some other things.
This tutorial is geared toward mapping under the Half-Life 2, Half-Life 2: Episode 1, or Portal configuration. This tutorial will not work with the Episode 2 configuration. The only way to do this scene on the Episode 2 config is by manually animating the camera with a bunch of path_tracks and path_corners. Here is an example map from Halfwit-2.com.
1. Start up Hammer.
2. Brush out your basic level, including info_player_start. Here’s a picture of what I’ll be using for the tutorial:
3. Place a prop_dynamic so it shares its origin with info_player_start. If you do not know what this means, just place the prop_dynamic on the floor so it is in the exact middle of the player. It should be exactly halfway under the ground as well.
4. Go under the prop_dynamic’s properties and change the “World Model:” to “models/blackout.mdl” It should be the only model in the root folder of your model browser. The model is an animated prop that moves like the player is getting up or entering a vehicle. I’ll get to more of that in a bit. Also name the entity “blackout” and disable shadows on it.
5. You’ll get this odd looking invisible model. Rotate it so it is sticking out behind the player. This is how it looks like in the Half-Life 2 configuration (under Episode 1 or Portal it will be much wider and wrap around the player):
6. Place a point_viewcontrol somewhere in the level. Do NOT rotate it.
7. Go into the point_viewcontrol’s properties and name it something like “blackout_viewcontrol.” Set it’s parent to “blackout.” Then go into the flags tab and make sure that “Freeze Player,” “Infinite Hold Time,” and “Snap to Goal Angles” are the only boxes ticked.
8. Add an env_fade somewhere and configure it to your liking (I’ll just leave it at it’s default settings). Make sure you name it something like “blackout_fadein” and that the “Fade From” flag is ticked!
9. Add a logic_auto somewhere. Now it’s time for some I/O work.
10. Here are the logic_auto’s outputs. It will (in order), parent the viewcontrol to the moving part of the blackout prop so it will move with it, enable the viewcontrol so the player will see out of it, tell the env_fade to fade in, and after a 5 second delay tell the blackout prop to start moving. Copy this in:
11. Mouse over to the prop_dynamic again (if you are having trouble selecting it, go to “Map > Entity Report…” and select it from the list). Add the following output (this will disable the viewcontrol and give control back to the player when finished moving):
12. And you are done. Not that bad, right? Go ahead and compile to test it out in game!