Doors are moving brushes that can move into chosen direction. Rotating door rotate around built axis. Even if the name is "func_door" and "func_door_rotating" the our creativity may us use those entities in any situation, anything can move in certain direction, or rotate (e.g. simple lift moving, or rotating chest lid e.t.c.). 1. Make sure you have created room with light and info_player_start. 2. Create a wall with brush tool. Make a hole for door.
Dimensions of the door can be: 96x64, or 128x64 depend on how tall your wall is. Create a door from brushes. It makes them looks better in-game, specially in sliding door types. 3. If the door is as thick as wall, reduce their width from both sides. 4. Swinging Door ONLY- creating door_rotating with no origin makes them rotating around world center- it's unwanted effect.
Sliding Door
1. Turn the door brush into entity: func_door.
2. Go into properties of newly created door.
3. Use the circle on the right top corner to determine in which direction the door should move. Zero means it move in positive X direction. The circle represents top (x/y) view of the editor. You can choose DOWN/UP direction from drop-down list under the circle.
4. Now let's see some most important keyvalues:
speed --> determines how fast our door moves (units per seconds). move sound --> sound playing when door starts moving. stop sound --> sound playing when door ends movement. delay before close --> time (in seconds) to auto close the door after opening. Set it to "-1" to make door stay opened forever. lip --> how many units door sticks out of the wall after opened. You can enter negative values to sew the door into wall. locked sound --> the sound playing when player attempt to open the locked door. The door can be locked by setting up a master entity. who can open this --> only touching opening mode (by default enabled). Who or what can open the door. "Pushables" mean only func_pushable entities. "No clients" means players can't open the door. ignore targetname --> normally when you give the door a name, it became unuseable by touching them. Setting this to "yes" will prevent that. breakable --> adds a func_breakable functionality. obey trigger mode --> allows to send "on" and "off" trigger signal to this door where "on" input is for opening and "off" input for closing.
Obey trigger mode is disabled by default, so input will always toggle door no matter if it's "on" or "off" input trigger mode.
5. Now let's go into "flags" tab:
starts open --> doors starts opened. don't link --> prevent the doors with the same name to open together. passable --> can be passed through. toggle --> door can be freely opened and closed. Disables "delay before close" function, anyway delay before close must be different than 0. use only --> door only opens when receiving USE input from player. Disables touching opening. monster can't --> makes all monsters can't open this door.
no link-checking--> door won't link to another door with the same name (won't opens other doors with the same name). Still other doors can link to this door.
Swinging Door
1. Open the texture browser, Select the "ORIGIN" texture.
2. Create a brush that will simulate rotation axis of your door. It must be covered with "ORIGIN" texture. The center of the origin brush determines rotation axis of the door. Look screenshot on the right.
3. Turn the brush you wish to be door and the origin brush (both must be selected) into entity: func_door_rotating.
4. Go into properties of newly created func_door_rotating.
5. Set some keyvalues. Most of keyvalues are the same as in the func_door entity (look above for func_door keyvalues):
distance (deg) --> how many degrees the door will rotate around it's axis (determined by this brush axis). Can be negative. The distance is counter clockwise if reverse dir is not set, also remember that door might open in both directions when one way isn't selected. 6. Set up flags, most of them are the same as in standard func_door (look above for flags info):
reverse dir --> reverse the direction of the doors rotation. one way --> the door open only in one direction.
x axis --> makes door rotate around X axis. Disables Default z axis rotation. y axis --> makes door rotate around Y axis. Disables Default z axis rotation.
Double Doors Method ONE
1. Create two different doors, make them func_door or func_door_rotating. Use the rules above.
2. Touching the center of two doors makes them opens together.
3. Comment how dumb this tutorial is.
Double Doors Method TWO
If you need simultaneous opening and closing. 1. Create two different doors, turn them into func_door or func_door_rotating.
2. Name the doors with the same name. Setting Delay before close in both doors will make them close at the same time.
3. Go to flags tab and select in both doors: don't link, one way.
4. Go to flags tab and select in one of two doors: reverse dir.
5. Trigger the doors (e.g. turn some brush into func_button, and in the button target field enter the name of doors. Set button's Delay before reset so its equals/greater than delay before close. If you want to open the doors with walking on them just create the brush covered with "AAATRIGGER" texture. Tie it to Entity "trigger_multiple". Set up target to doors name. Don't forget to set trigger's delay before reset. Don't set up delay before reset to less than door's delay before close).
Door with transparent element
The point is to create two doors. One of them is transparent. They will be triggered at the same time so they gonna move together. If you creating two func_door_rotating you need to place two origin brushes with the same center (the door's and glass axis of rotation must be the same).
1. Create the brush that will be our door. Make a hole in the door for the glass, (or any other transparent element). Put the glass/grate brush in the door hole.
2. Turn the door into entity. Then turn the glass/grate into entity and set them up. Speed, Distance/Yaw and name must be the same in both door and grate/glass.
3. Set the render mode and FX amout in transparent element: Solid/255 for grates, Texture/150 (or other value) for glass e.t.c.
IMPORTANT: if the door is a swinging door (rotating) then you must create two origin brushes- one for the door, second for the glass/ grate. The center of origins must be the same, even if the glass/grate origin is not touching glass itself.
The best way is to create the first origin for door, then copy it into itself, so we have two origin brushes overlapping. Now you can turn door brush + one of the origin into first func_door_rotating, and then transparent element with second origin into second func_door_rotating.
4. Trigger the doors (e.g. turn some brush into func_button, and in the button target field enter the name of doors. Set button's Delay before reset so its equals/greater than delay before close. If you want to open the doors with walking on them just create the brush covered with "AAATRIGGER" texture. Tie it to Entity "trigger_multiple". Set up target to doors name. Don't forget to set trigger's delay before reset. Don't set up delay before reset to less than door's delay before close).
You can also achieve the same effect by using trigger_setorigin entity.
|
|