Login | Register 

Level design

Rotating Door

In this tutorial we will make a rotating door.

Entity Keys

These are all the available keys for the func_rotating_door:

directionForce the door to open in a set direction: 1 is clockwise, -1 is ccw.
waitHow long to wait until door auto-closes (default is 0, which means stay open).
trigger_onlySet to 1 if the door can only be opened by a switch or trigger(ie: prevents a player from opening it manually).
pos1Sound to play when door starts moving ("none" for nothing, defaults to a creak)
pos2Sound to play when door stops moving ("none" for nothing, defaults to a creak)
noiseLooping sound to play as door is moving (defaults to no sound)
gamemode_openGametypes to have the door locked in the open position. List gametypes in format : "0,1,2,3,4"
gamemode_shutGametypes to have the door locked in the closed position. List gametypes in format : "0,1,2,3,4"
onlySet to allow only one team to use this entity, used for CTF or other respawn type modes to create spawn rooms. Values: 'blue' or 'red' - Default: anyone.

The Door

In this tutorial we make a rotating door that can be placed anywhere in your map. A good size for a single door in 56 units wide and 92 units tall, but of course you can make them any size you want. Create a brush that fits into your door frame and make it 4-8 units thick and apply a nice texture to it. This will be the actual door. Of course your door doesn't have to consist of a single brush you can use many brushes if you want a nicely detailed door.

The Hinge

Now create a brush that is as tall as the door (it doesn't have to be as tall, but it's easier to find this way), 16 units thick and 16 units wide. Texture this brush with the shader common/origin. Place this brush so that it has it's center where the hinges would be on a real door. (see the image below) The door will rotate about the center point of this origin brush.

Putting it Together

Now select both the door brush and the origin brush. When you have the door brush and the origin brush selected, right click in the 2D window to bring up the entities pop-up menu. Select the sub menu func and then select func_rotating_door. This is enough to make a working door, you can compile and test your map now, or edit some of the doors actions, see notes below.


Using custom door sounds are really easy to do and adds atmosphere to the map; the default squeak sounds pretty cheap.
You don't really need to set a noise or pos2 key, the pos1 sound could last long enough for the duration of the door opening.
If you want the player to be able to open the door only by a func_button or similar entity, and not to be able to open it in a regular manner, use the trigger_only key.
In Urban Terror the doors will always open away from the player, if you don't lock the direction with the direction key, so keep that in mind when constructing doorways.
The gamemode_open & gamemode_shut keys are used to lock the door in its open or closed position in certain gametypes. You can use this to change the layout of a map in different gametypes, you can also use the func_wall entity.
The speed key is listed in the editor documentation for this entity as a speed control for the door's motion, however you should not use this key at all as it causes much weirdness in the doors rotation.
By NulL  -  Sunday, 29 May 2011  -  viewed by 1511 members and 30907 visitors

Sponsored link

Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942