Level Editor/Entities/Door

Revision as of 03:45, 20 October 2026 by TeamSpecBot (talk | contribs) (Level Editor: Door page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Door
Made with Functional > Door (from Selection)
What it is Brushes and props that slide or swing open when a player walks up, and close again
In the game Yes, it is exported with the map

A door is a set of brushes and props that slides or swings open when a player walks up to it and closes again by itself, as Hammer's func_door and func_door_rotating do: spawn room doors, a garage shutter, a gate only one team opens, a hatch the gamemode opens when a point is captured.

Making one

  1. Build the door's leaf from brushes and props, standing shut in its doorway.
  2. Select them all.
  3. Choose Functional > Door (from Selection). (With nothing selected: Select the brushes and props the door is made of first.)

The selection goes into a new door, as Group Selection puts it into a group: its origin in the middle of what it holds, everything keeping its place. Undo takes it back out. The status line says Door made of N node(s): it slides up its own height; its motion and who opens it in the inspector. A new door slides up its own height, opens for anybody, and closes three seconds after it has opened.

To change what a door holds, drag brushes and props into or out of it in the scene tree. A door is not something new things are placed into by clicking.

The blue line in the views is the path the middle of the door takes: straight for a slide, an arc for a swing.

Inspector

Motion

Setting Type Default What it does
Motion List Slide Slide or Swing.
Slide Direction List Up Slide. Which way it opens, in the door's own axes: Up, Down, Left, Right, Forward, Back.
Slide By Size Check box On Slide. Move its own size that way, less Lip. Off, move Slide Distance.
Slide Distance Metres 2.0 Slide. How far it moves, with Slide By Size off.
Lip Metres 0 Slide. How much of the door stays in the doorway when it has slid its own size. A door 3 m tall with a 0.2 m lip slides up 2.8 m and leaves 20 cm showing below the lintel.
Speed m/s 2.5 Slide. How fast it slides.
Hinge Point Metres (X, Y, Z) the left edge Swing. A point on the hinge line, in the door's own space. A new door's hinge is the left edge of what it holds.
Hinge Axis Direction Up (0, 1, 0) Swing. The hinge line's direction, in the door's own space.
Swing Degrees -360 to 360 90 Swing. How far it turns.
Swing Away Check box On Swing. Swing away from whoever opened it, as a pushed door does. Off, always the way Swing Degrees turns.
Swing Speed °/s 120 Swing. How fast it turns.

Behaviour

Setting Type Default What it does
Wait Seconds 3 How long it stands open before closing. While a player who may open it stands at it, it stays open. Below 0 it never closes by itself.
Starts Open Check box Off Open when the map starts.
Starts Locked Check box Off Locked when the map starts. A locked door does not open until something sends it Unlock.
Team List Anyone Who opens it by walking up to it: Anyone, Team 1 or Team 2.
Touch Opens Check box On Walking up to it opens it. Off, only the gamemode or an output opens it.
Trigger Reach Metres 1.0 How far round the shut door a player opens it from.

Sounds: Open Sound, Close Sound and Locked Sound pick from the game's own sounds (type to search); none by default. The locked sound plays when a player who could open the door tries it while it is locked.

Outputs: what the door fires as it moves, and at whom (see below).

Preview: Play opens the door, lets it wait and shuts it again, once, on a see-through copy of what it holds. Nothing in the map moves, so nothing you save is ever half open.

Outputs and inputs

Events a door fires: OnOpen and OnClose as it starts to move, OnFullyOpen and OnFullyClosed as it stops, and OnLockedUse when a player it would open for walks up while it is locked.

Inputs it takes, by its name in the scene tree: Open (a locked door stays shut), Close, Toggle, Lock (nothing opens it, and bots stop pathing through it) and Unlock. See Outputs and logic.

In the game

  • Whoever stands on a door rides it, and whatever is in its way is pushed. It never stops for a player in its way and never hurts one: a player caught between a door and a wall is pushed out.
  • Sounds play on players' machines.
  • A door is lit by light probes rather than the lightmap, so it leaves no baked shadow where it stood shut.
  • A door does not ride a moving platform; it exports where it stands.
  • Give each door its own name: with two doors of the same name the game opens only the first, and the export warns.

Bots know about doors. The floor in a doorway becomes its own piece of the navigation, which the game opens to every bot while the door is open, to the bots of the team that opens it by walking up while it is shut (by touch, or through a zone whose OnEnter or OnFirstEnter opens it, at once or through a relay, with the output's Team set), and to none while it is locked. Bake a Nav Region over the doorway as for any floor. If the export log says a door has no doorway polygons, there is no walkable baked floor under it.

From a gamemode

api.doors, api.door_open, door_close, door_toggle, door_lock, door_unlock, door_state and the _door_changed hook. See Map entities.

Related pages

TeamSpec Level Editor
Basics Getting started · Interface · Viewport and camera · Selecting and hiding · Keyboard shortcuts · Settings · Map Config · Troubleshooting
Menus File · Edit · View · Tools · Functional
Panels Scene tree · Inspector · Materials · Props · Snapping · UV editor · Displacement · Terrain
Tools Move, Rotate and Scale · Box · Sphere · Cylinder · Prism · Stairs · Spiral Stairs · Spiral Tower · Arch · Path Brush · Plane · Terrain · Clip · Duplicate · Ruler and Cordon · Edit Vertex and Edge · Edit Face · Loop Cut · Material Brush · Vertex Color Brush · Displacement · Prop Path
Entities Brush · Zone · Group · Mirror Node · Prop · Spawn Point · Supply Pickup · World Boundary · Lights · Water · Sounds · Anchor Platform · Payload Track · Boss Spawn · Map Marker · World Text · Decal · Door · Button · Logic entities · 3D Skybox · Nav Region
Workflows Your first map · Brushes and CSG · Materials and UVs · Lighting and lightmaps · Bots and navigation · Mirrored maps · Outputs and logic · Custom assets · Playtesting · Exporting and publishing · Importing Source maps
Scripting Overview · Server rules · Client HUD · Bots · Teams and spawning · Zones · Pickups · Payload tracks · Map entities · Sandbox limits · Testing · King of the Hill · Team Deathmatch · API reference · What a script may use