How to Make a Rotating Door

 

Before you can make a rotating door, you should know how to make a rotating object. Therefore, I'll cover this first.

First a Fan!

Ok, I have made a large room, and I’ve made a pit on one side. We are going to make a fan in this pit.


Now, we have to make the brushes that make up the fan. I’m using an eight sided cylinder for the axle, and two skewed rectangular brushes for the blades


Now, we have to turn it into an entity. However, if we turn it into a ‘func_rotating’ now, we’ll have a problem. It would spin around the center of the level! In order to tell Half-Life what you want the object to spin around, you have to use an 'origin' brush. This is simply a brush with the 'origin' texture covering all sides. Half-Life uses the center of the origin brush that is part of the rotating object as the point of rotation. Origin brushes, like trigger brushes, won't appear in the game. Make an origin brush in the center of the axle.


I usually make my origin brushes easy to select if I need to move them. Now select all four brushes (axle, the two blades and the origin brush). (Select one brush then hold ctrl and select the others.) Now click ‘to Entity’. You will get a dialog box similar to this:



Choose ‘func_rotating’ as the class. Leave the angle alone. Now for the attributes:

  • You can name it if you want to trigger it.
  • The next four are your standard render options
  • Rotation speed, this is how fast it will spin in degrees per second, I’m setting it to 180.
  • Volume is how loud the fan is (you can set the sound below)
  • Friction sets the spin-up/ spin-down time of the fan if you have the acc/dcc flag set.
  • With Fan sounds, you can choose a sound or... ( I chose fast beating) Set the file/path name of a sound to play
  • _minlight is the minimum light level for the fan.
  • Pitch, Yaw, Roll and  X Y Z will change orientation and/or move the fan from where it is when the level starts. This is used mainly to have the fan in the map file at one place so it gets lit a certain way, but move it where you want it to be when the level starts. If you don’t understand this, just leave it. I’ve never used it.
  • Finally, we have damage when blocked. I’m setting this to 50.

Now click the flags tab.

  • ‘Starts On’ will have the object start rotating when the level starts, otherwise it has to be triggered. I’m checking this.
  • Normally the objects rotate clockwise, ‘Reverse Direction’ will change the direction
  • Normally the objects will rotate from the top view (like we want our fan to). However if you have a fan on a wall, select either ‘X axis’ or Y’ axis’ to have it rotate on either the X or Y axis. Don’t select both!
  • ‘Acc/Dcc’ will have the object accelerate from a stop or decelerate to a stop when triggered.
  • I’m not sure what fan pain does.
  • Not solid means players and other objects will be able to pass through the rotating object.
  • The last three control how far away the sound will be heard. Only select one. I’m selecting small radius.

Ok, add an info_player_start and we are ready to test!

As you can see, the fan rotates and as you get near it, gets louder. Actually I wanted it to spin so it would blow up, so I have to go back and set the reverse direction flag.

 

Now for a door!

Once you knw how to make a normal sliding door, and you know how to make a rotating object, a rotating door is easy. It is mostly a combination of the two.

Ok, I’ve added a wall in the room to make two rooms, and cut a hole for the door like so:


Now, I’ll make a door brush to fill the opening, and make it 16 units thick. I’m placing it even with this side of the wall. Then I’ll make an origin brush with its center in the center of the edge of the door, like this:

Now, select the origin brush and the door brush and click ‘To Entity’. Choose 'Func_rot_door' as the class.



These settings are the same as a normal ‘func_door’ (see normal door tutorial) except for the last two. I set the 'delay before close' to 3 (remember to change this from 4 if you want the door to close again), and I set a move and a stop sound. The new settings are: ‘Distance(deg)’ the distance the door will open in degrees, 90 is fine, and ‘Pitch Yaw Roll’ is the same as the func_rotating’s setting, leave it unless you have a good reason to change it.

Now click the Flags tab.



You should be able to tell what most of these do from the fan example above or from the normal door tutorial.

  • 'Starts open' will start the level with the door open.
  • ‘Reverse dir’ can be used with 'one-way', see below.
  • Not sure what ‘don’t link’ or ‘Passable’ do.
  • ‘One-way’ will have the door only open in one direction (It will normally open in either direction). If you set this and it opens in the wrong direction, set ‘Reverse Dir'.
  • ‘Toggle’ will have the door change state from closed to open or open to closed, instead of going from closed to open and back to closed when triggered.
  • ‘X axis’ and ‘Y axis’ will change the axis of rotation, just like with a func_rotating.
  • ‘Use only’ will have the door open only when the player presses their use key.
  • ‘Monsters can’t’ will not let monsters open the door in single player.
  • ‘Not in deathmatch’ will have the door only appear in single player.

That's all the settings, run the map and check it out!

EXAMPLE MAP

A few more examples.

I’ve made a few more examples.

Door two has the ‘one-way’ and ‘use only’ flags set. Try out the map to see how this effects it. You can also set the ‘reverse dir’ flag to switch the direction it opens.

Door three is a garage door. It hinges along the top. I set the ‘Y axis’ flag (trial and error), ‘one-way’ flag, ‘Reverse dir’ flag, and the ‘use only’ flag.

That’s about it. One thing I have noticed is, if you have the ‘use only’ flag set, you will only be able to open the door from one side. You may want to be careful with that setting.

Until next time, Happy Mapping!

 

TroZ My spray paint in Halflife

troz_@hotmail.com