VERC: Door With Turning Handle Last edited 15 years ago2003-03-17 20:27:00 UTC by Penguinboy Penguinboy

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

It's simple. You go up to a door, turn its handle, and then open it. But it seems like things work differently in Half-Life. Where are the doorknobs? Unfortunately, in Half-Life, it's impossible to bind one entity to another. Some mods (notably Spirit of Half-Life) have achieved this effect, but it sadly isn't available in normal Half-Life. Some situations can be faked though. This article covers how to make a door that has a handle that turns when it opens.

Setup

This door event breaks down into four physical pieces ( the actual door, a fake door, a handle that starts in the closed position, and a handle that starts in the open position ) and a set of control entities.
illusion3_01.jpgillusion3_01.jpg

The Actual Door

The actual door is a func_door_rotating (Link: index.php?ent=func_door_rotating) . Create it as you would normally, including as part of it the handle as it would appear in its open state ( as shown above, assuming the handle would be pointing left/right when closed ). Give it a Name ( targetname ) of door1 . Set its Render Mode ( rendermode ) to Texture (2) . This will make the door start invisible. Finally, set the Fire on close ( netname ) to closedoor1 .
illusion3_02.jpgillusion3_02.jpg

The Fake Door

The fake door is what the player will actually see at first. It has no handle attached to it and doesn't open. Create the fake door and turn it into a func_wall_toggle (Link: index.php?ent=func_wall_toggle) . Give it a Name ( targetname ) of fakedoor1 .
illusion3_03.jpgillusion3_03.jpg

Handle #1

Handle #1 is the door handle the player will first see when he sees the door. It is a func_rot_button (Link: index.php?ent=func_rot_button) . It should be created in the closed position. Give it a Name ( targetname ) of handle1a . Give it a Target ( target ) of opendoor1 . Set its Master ( master ) to _handle1a . In the Flags properties, enable the Not solid flag along with any flags you need to make the button rotate correctly into the closed position.
illusion3_04.jpgillusion3_04.jpg

Handle #2

Handle #2 is what the player will see when the door returns to its closed position. It will start in the open position and move to the closed position. It is also a func_rot_button (Link: index.php?ent=func_rot_button) . Create it in the open position as shown above. Give it a Name ( targetname ) of handle1b . Give it a Target ( target ) of lockdoor1 . Set its Render Mode ( rendermode ) to Texture (2) so it starts invisible. Set its Master ( master ) to _handle1b . In the Flags properties, enable the Not solid flag along with any flags you need to make the button rotate correctly into the closed position.

Coordination

illusion3_05.jpgillusion3_05.jpg
Ok, now to coordinate the event. This is where it gets ugly. Are you sure you want to make a door with a rotating handle? Allllright then, read on. One note about the control entities - their location is unimportant. They're used purely to control the four entities listed above.

Controls Entities 1 - 6

These entities control the On/Off state of the handles through the use of multisource (Link: index.php?ent=multisource) and env_global (Link: index.php?ent=env_global) entities.
  1. The first entity is an env_global. Set its Name ( targetname ) to enablehandle1a . Set the Global State to Set ( globalstate ) to g_handle1a . Set the Trigger Mode ( triggermode ) to On (1) . Set the Initial State ( initialstate ) to On (1) . In its Flags properties, enable the Set Initial State flag.
  2. The second entity is a multisource. Set its Name ( targetname ) to _handle1a . Set its Global State Master ( globalstate ) to g_handle1a .
  3. The third entity is an env_global. Set its Name ( targetname ) to disablehandle1a . Set the Global State to Set ( globalstate ) to g_handle1a . Set the Trigger Mode ( triggermode ) to Off (0) . Set the Initial State ( initialstate ) to Off (0) .
  4. The fourth entity is an env_global. Set its Name ( targetname ) to enablehandle1b . Set the Global State to Set ( globalstate ) to g_handle1b . Set the Trigger Mode ( triggermode ) to On (1) . Set the Initial State ( initialstate ) to On (1) .
  5. The fifth entity is a multisource. Set its Name ( targetname ) to _handle1b . Set its Global State Master ( globalstate ) to g_handle1b .
  6. The sixth entity is an env_global. Set its Name ( targetname ) to disablehandle1b . Set the Global State to Set ( globalstate ) to g_handle1b . Set the Trigger Mode ( triggermode ) to Off (0) . Set the Initial State ( initialstate ) to Off (0) . In its Flags properties, enable the Set Initial State flag.

Control Entities 7 - 12

These are the env_renders (Link: index.php?ent=env_render) that control whether the actual door and handles are visible or not.
  1. Set the first env_render Name ( targetname ) to showdoor1 . Set the Target ( target ) to door1 .
  2. Set the second env_render Name ( targetname ) to hidedoor1 . Set the Target ( target ) to door1 .
  3. Set the third env_render Name ( targetname ) to showhandle1a . Set the Target ( target ) to handle1a .
  4. Set the fourth env_render Name ( targetname ) to hidehandle1a . Set the Target ( target ) to handle1a .
  5. Set the fifth env_render Name ( targetname ) to showhandle1b . Set the Target ( target ) to handle1b .
  6. Set the sixth env_render Name ( targetname ) to hidehandle1b . Set the Target ( target ) to handle1b .

Control Entities 13 - 15

These are multi_managers (Link: index.php?ent=multi_manager) that control the three sequences of the event (opening the door, closing the door, locking the door).
  1. Give the first multi_manager a Name ( targetname ) of opendoor1 . Turn off SmartEdit mode and add the following keys and values.
  1. Give the second multi_manager a Name (targetname) of closedoor1. Turn off SmartEdit mode and add the following keys and values.
  1. Give the third multi_manager a Name (targetname) of lockdoor1. Turn off SmartEdit mode and add the following keys and values.

The End

So, as you can see, its a bit of a hassle to get a door with a rotating handle, but if you need or want to do it, it can be done. As you might be able to tell, the most important things to know when trying to create this type of illusion is how to use multisource (Link: index.php?ent=multisource) , multi_manager (Link: index.php?ent=multi_manager) , env_global (Link: index.php?ent=env_global) , and env_render (Link: index.php?ent=env_render) entities. The most important thing, from the players point of view, is that everything should integrate seamlessly. For all intents and purposes, the rotating handle is part of the door, as far as anyone playing the level is concerned.

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.

Comments

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