VERC: Doors With Glass Last edited 21 years ago2003-03-11 22:09:00 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

Introduction

How do I make a moving door with transparent glass sections? This is a fairly common question. The short answer is, you make two doors (one for the frame and one for the glass) and trigger them to act together. If that's enough for you to go on, great! Otherwise, read on.

Setup

A door with a glass section is obviously composed of two parts: the solid door frame, and one or more sections of transparent glass. These two parts must act together to appear as one object. This is done by making the two parts triggerable only, and then activating them both with one trigger. Further complicating the situation, you can have a rotating door with a glass section, or a normal sliding door with a glass section. Both of these use different concepts. We'll look at the rotating door first.

Rotating Door with Glass

For this example, I've used the FIFTIES_DR8 door texture. I've cut out the window part (which is black in the texture) and replaced it with the GLASSGREEN texture. Below are three pictures showing the sequence of creation.
glassdoor1.gifglassdoor1.gif
glassdoor2.gifglassdoor2.gif
glassdoor3.gifglassdoor3.gif
The first picture is the main solid door frame part. It is a normal func_door_rotating rotating door. Note its origin brush - the greenish textured brush on the lower right of the object. This door is setup just like any other func_door_rotating. The things that need to set for this are Name ( targetname ) - for this example I've used rdoor1 . The rest can be left at the default settings (make sure you click on each one in the entity properties so the default is saved to the .map).

Picture #2 shows the door with the glass section in place. Note its origin brush right beside the glass section. The properties of this should exactly mirror the properties for the normal door, above, with the following additions. The Render Mode ( rendermode ) should be set to Texture (2) , and the FX Amount ( renderamt ) should be set to 96 . This will make the glass section transparent.

Picture #3 in the sequence of three shows the door with its trigger (a trigger_multiple (Link: index.php?ent=trigger_multiple) ) in place. Walking into the trigger will cause the door to open. Its Target ( target ) is set to door1 , and its Delay before reset ( wait ) is set to 1 .

For more information on the func_door_rotating entity, refer to its description (Link: index.php?ent=func_door_rotating) . For more information on creating transparency, see the Glass and Transparency (Link: index.php?go=transparency) article.

Sliding Door with Glass

The other type of door would be a sliding door. For this example, i've used the OUT_W1DR1 door texture. As above, I've used the GLASSGREEN texture for the glass. Again, below is a sequence of three pictures showing the creation process.
glassdoor4.gifglassdoor4.gif
glassdoor5.gifglassdoor5.gif
glassdoor6.gifglassdoor6.gif
Picture #1 shows the solid door frame. It's a normal func_door. It's modified settings are: the Name ( targetname ) is set to door1 . Its Lip ( lip ) value is set to 4 . This ensures that the door doesn't slide complete into the wall. (Don't forget to set the angle as well.)

Picture #2 shows the glass section of the door in place. As with the rotating example, its setup exactly the same as its solid counterpart, except for the following additions and tweaks. First, setup the rendering modes as was outlined in the rotating door description, above. Next, you need to determine the Lip ( lip ) value. Since the glass section is not the same width as the frame section, you cannot use the same value for both. Below is a picture (a top view from Worldcraft) of the door in its closed and open state.
glassdoor7.gifglassdoor7.gif
In the picture above, the object on the left is the door in its closed state, the one on the right the open state. The purple sections are the solid door frame, the red sections are the glass areas. Notice how there is a 16 unit gap between the red (glass) objects. This is how you determine the lip value. Since there is a gap between the glass sections rather than them overlapping, the lip value will be negative. So, for the glass func_door, use a Lip ( lip ) value of -16 .

Picture #3 in the sequence of three shows the trigger in place. As with the rotating door example, this is a trigger_multiple (Link: index.php?ent=trigger_multiple) . Its Target ( target ) is set to door1 , and its Delay before reset ( wait ) is set to 1 .

For more information on the func_door entity, refer to its description (Link: index.php?ent=func_door) .

Notes

So, to go over the basic concept once more - Regardless of whether you're using a rotating door or a sliding door, its the same basic principle. You'll have a solid door frame and a glass section. Both of these will have the same name, and both of these will be opened by the player walking through a trigger_multiple that acts as the door's "open" field.

Example

For a more concrete illustration, check out the example map linked below.
This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

1 Comment

Commented 11 months ago2024-01-13 00:20:03 UTC Comment #105869
I discovered a trick with using User posted image BOUNDINGBOX brush which eliminates the lip math. You make it the same width as the main door and tie it to the glass part. No messing with lip value for the glass door; use the same value as the main door.

You must log in to post a comment. You can login or register a new account.