Creating a wake-up bed: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
<div style='padding-left:20px'>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.</div> | <div style='padding-left:20px'>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.</div> | ||
Line 7: | Line 5: | ||
<div style='clear:both'> | <div style='clear:both'> | ||
===Models=== | ===Models=== | ||
<div style='padding-left:20px'>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.</div></div> | |||
<div style='padding-left:20px'>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.</div></div> | |||
<div style='clear:both'> | <div style='clear:both'> | ||
===Blackout=== | ===Blackout=== | ||
<div style='padding-left:20px'>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.</div></div> | |||
<div style='padding-left:20px'>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.</div></div> | |||
<div style='clear:both'> | <div style='clear:both'> | ||
===Start=== | ===Start=== | ||
[[Image: | [[Image:Bed_tutorial_setup.jpg|right|thumb|Placing the info_player_start]] | ||
<div style='padding-left:20px'>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.</div></div> | <div style='padding-left:20px'>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.</div></div> | ||
Line 24: | Line 21: | ||
<div style='clear:both'> | <div style='clear:both'> | ||
===Camera=== | ===Camera=== | ||
<div style='padding-left:20px'>Place a point_viewcontrol somewhere near the bed. It's position does not matter. Do not rotate the camera, leave it at the default rotation. Call it blackout_cam and set it's parent to blackout. Have only these three flags checked: Freeze player, Infinite hold time, and Snap to goal angles</div></div> | <div style='padding-left:20px'>Place a point_viewcontrol somewhere near the bed. It's position does not matter. Do not rotate the camera, leave it at the default rotation. Call it blackout_cam and set it's parent to blackout. Have only these three flags checked: Freeze player, Infinite hold time, and Snap to goal angles</div></div> | ||
Line 30: | Line 26: | ||
<div style='clear:both'> | <div style='clear:both'> | ||
===Other Entities=== | ===Other Entities=== | ||
<div style='padding-left:20px'>Add a env_fade, set to fade from. Call it blackout_fade<br><br>Add an ambient_generic, call it bed_cover_sound, set it's sound origin to bed_cover, and set it's sound to ''Doors.FullClose14''.</div></div> | |||
<div style='padding-left:20px'>Add a env_fade, set to fade from. Call it blackout_fade<br><br>Add an ambient_generic, call it bed_cover_sound, set it's sound origin to bed_cover, and set it's sound to Doors.FullClose14.</div></div> | |||
<div style='clear:both'> | <div style='clear:both'> | ||
===Logic=== | ===Logic=== | ||
[[Image: | [[Image:Bed_tutorial_setup.jpg|right|thumb|Final Setup]] | ||
<div style='padding-left:20px'>Create a logic_auto with the following outputs: | <div style='padding-left:20px'>Create a logic_auto with the following outputs: | ||
Line 66: | Line 61: | ||
|} | |} | ||
</div></div> | </div></div> | ||
== Conclusion == | |||
<div style='padding-left:20px'>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.</div> | |||
== See also == | == See also == |
Revision as of 14:02, 15 June 2009
Introduction
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.
Models
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.
Blackout
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.
Start
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.
Camera
Place a point_viewcontrol somewhere near the bed. It's position does not matter. Do not rotate the camera, leave it at the default rotation. Call it blackout_cam and set it's parent to blackout. Have only these three flags checked: Freeze player, Infinite hold time, and Snap to goal angles
Other Entities
Add a env_fade, set to fade from. Call it blackout_fade
Add an ambient_generic, call it bed_cover_sound, set it's sound origin to bed_cover, and set it's sound to Doors.FullClose14.
Add an ambient_generic, call it bed_cover_sound, set it's sound origin to bed_cover, and set it's sound to Doors.FullClose14.
Logic
Create a logic_auto with the following outputs:
Set these for the blackout model:
Conclusion
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.