Level Editor/Entities/Door: Difference between revisions
TeamSpecBot (talk | contribs) Level Editor: Door page |
TeamSpecBot (talk | contribs) American spelling |
||
| Line 24: | Line 24: | ||
{{Property row|name=Slide Direction|type=List|default=Up|desc=''Slide.'' Which way it opens, in the door's own axes: Up, Down, Left, Right, Forward, Back.}} | {{Property row|name=Slide Direction|type=List|default=Up|desc=''Slide.'' Which way it opens, in the door's own axes: Up, Down, Left, Right, Forward, Back.}} | ||
{{Property row|name=Slide By Size|type=Check box|default=On|desc=''Slide.'' Move its own size that way, less Lip. Off, move Slide Distance.}} | {{Property row|name=Slide By Size|type=Check box|default=On|desc=''Slide.'' Move its own size that way, less Lip. Off, move Slide Distance.}} | ||
{{Property row|name=Slide Distance|type= | {{Property row|name=Slide Distance|type=Meters|default=2.0|desc=''Slide.'' How far it moves, with Slide By Size off.}} | ||
{{Property row|name=Lip|type= | {{Property row|name=Lip|type=Meters|default=0|desc=''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.}} | ||
{{Property row|name=Speed|type=m/s|default=2.5|desc=''Slide.'' How fast it slides.}} | {{Property row|name=Speed|type=m/s|default=2.5|desc=''Slide.'' How fast it slides.}} | ||
{{Property row|name=Hinge Point|type= | {{Property row|name=Hinge Point|type=Meters (X, Y, Z)|default=the left edge|desc=''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.}} | ||
{{Property row|name=Hinge Axis|type=Direction|default=Up (0, 1, 0)|desc=''Swing.'' The hinge line's direction, in the door's own space.}} | {{Property row|name=Hinge Axis|type=Direction|default=Up (0, 1, 0)|desc=''Swing.'' The hinge line's direction, in the door's own space.}} | ||
{{Property row|name=Swing Degrees|type=-360 to 360|default=90|desc=''Swing.'' How far it turns.}} | {{Property row|name=Swing Degrees|type=-360 to 360|default=90|desc=''Swing.'' How far it turns.}} | ||
| Line 34: | Line 34: | ||
{{Property table end}} | {{Property table end}} | ||
''' | '''Behavior''' | ||
{{Property table start}} | {{Property table start}} | ||
{{Property row|name=Wait|type=Seconds|default=3|desc=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.}} | {{Property row|name=Wait|type=Seconds|default=3|desc=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.}} | ||
| Line 41: | Line 41: | ||
{{Property row|name=Team|type=List|default=Anyone|desc=Who opens it by walking up to it: Anyone, Team 1 or Team 2.}} | {{Property row|name=Team|type=List|default=Anyone|desc=Who opens it by walking up to it: Anyone, Team 1 or Team 2.}} | ||
{{Property row|name=Touch Opens|type=Check box|default=On|desc=Walking up to it opens it. Off, only the gamemode or an output opens it.}} | {{Property row|name=Touch Opens|type=Check box|default=On|desc=Walking up to it opens it. Off, only the gamemode or an output opens it.}} | ||
{{Property row|name=Trigger Reach|type= | {{Property row|name=Trigger Reach|type=Meters|default=1.0|desc=How far round the shut door a player opens it from.}} | ||
{{Property table end}} | {{Property table end}} | ||
Latest revision as of 04:44, 20 October 2026
| 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
- Build the door's leaf from brushes and props, standing shut in its doorway.
- Select them all.
- 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 | Meters | 2.0 | Slide. How far it moves, with Slide By Size off. |
| Lip | Meters | 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 | Meters (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. |
Behavior
| 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 | Meters | 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
- Button
- Outputs and logic
- Team gates (a door that is always open for one team)