Creating a wake-up bed
Creating a wake-up bed is extremely easy. If you have decompiled the first level and analyzed it, you may have noticed a bunch of extra entities, which over complicate it.
Create two prop_dynamic entities. One should be models\props\bed_body_reference.mdl and the other models\props\bed_cover_reference.mdl. Call the cover bed_cover. Disable shadows on both.
Create another prop_dynamic. Call it blackout, with the model models\blackin.mdl. This model will provide the movement for the camera. Place the blackout model as shown. Disable shadows on the model.
Put a info_player_start, so it shares the exact origin of the blackout model. Their origins are highlighted here. The player should form a right angle with the blackout model's origin. The position of this is very important so the transition is as smooth as possible.
Place a point_viewcontrol somewhere near the bed. Its position does not matter. Do not rotate the camera, leave it at the default rotation. Call it blackout_cam and set its parent to blackout. Have only these three flags checked: Freeze player, Infinite hold time, and Snap to goal angles.
Add a env_fade, set to fade from. Call it blackout_fade
Add an ambient_generic, call it bed_cover_sound, set its sound origin to bed_cover, and set its sound to Doors.FullClose14.
Create a logic_auto with the following outputs:
Set these for the blackout model:
This has the exact same function as the bed in the first chamber. It uses 1 sound entity (as the open and close sound are the exact same). It does not involve a teleporter, as it serves no logical purpose.
- Example map Example map using this tutorial. VMF included.