From Valve Developer Community
Jump to: navigation, search

func_door is a brush entity available in all Source games.

Entity description

It creates a simple sliding door.

func_door doesn't do any damage to the blocking player (with enabled force block damage) if he passed through some trigger_teleport to the destination by using noclip, blocking damage works again for that player if he passes through any teleport by himself without noclip


chainstodoor <string>!FGD
Passes the door's +use inputs onto the target.
Confirm:What does it do exactly to the target? Does it even work?
WaveHeight <int>!FGD
Height of waves. Legacy support from Half-Life, but non-functional.
Move Direction <angle>
The direction in which the door will move when it opens. It always opens far enough that it does not occupy the space it spawned in.
Block Filter Name <targetname>
(Half-Life: Source only) Filter to use to determine entities that block the door.


Origin (X Y Z) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.


Pitch Yaw Roll (Y Z X) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.


Speed <int>
Speed that the door moves, in units (sliding door) or degrees (rotating door) per second.
Start Sound <string>
Stop Sound <string>
Overrides for the sound played when the door starts/stops moving.
Start Close Sound <string>
Stop Close Sound <string>
Optional sound override used when the door is closing.
Delay Before Reset <int>
Time until the door returns to the closed position. A value of -1 means the door never auto-closes.
Lip <int>
The amount, in inches, of the button to leave sticking out of the wall it recedes into when pressed. Negative values make the button recede even further into the wall. (Not deprecated)
Blocking Damage <int>
Amount of damage done to entities that block the movement of this door, per frame.
Force Closed <bool>
Makes the door close no matter what. Useful for doors that have to close even if the player tries to block them with objects.
Ignore Debris <bool>
Changes the door's collision group to one that ignore collisions with debris objects. Not compatible with the non-solid-to-player spawnflag.
Health <int>
Message If Triggered <string>
Locked Sound <string>
Unlocked Sound <string>
Sounds played when the player tries to use the door.
Spawn Position <choices>
State the door should begin in; open or closed.
Locked Sentence <choices>
Unlocked Sentence <choices>
Deprecated. Were used in HL1 to play Black Mesa's "access denied" voice.
Minimum Light Level <int>
The minimum level of ambient light that hits this brush.
Loop Moving Sound? <bool>
Makes the door's Start Sound loop until the door finishes moving.
If an already-looping sound is played with this enabled, it can continue forever. Further attempts to open or close the door will only add another looping sample to the noise.


Disable shadows <boolean>
Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
Disable ShadowDepth <boolean> (New with Portal 2)
Used to disable rendering into shadow depth (for projected textures) for this entity.
Projected Texture Cache <choices> (New with Portal 2)
Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
  • 0 : Default
  • 1 : No cache - render every frame
  • 2 : Cache it - render only once
Disable flashlight <boolean> (New with Portal 2)
Used to disable projected texture lighting and shadows on this entity.


Global Entity Name <string>
Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.


Render Mode <choices>
Set a non-standard rendering mode on this entity. See Render Modes for details.
FX Amount (0 - 255) <int>
Intensity of the selected render mode.
FX Color (R G B) <color255>
Color used by the selected render mode (if applicable).
Disable Receiving Shadows <bool>
Prevents the entity from receiving shadows.


Render FX <choices>
Several GoldSrc-era visibility modes which change the way the entity is rendered, typically by fading it in and out.


Parent <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.


Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.


Starts Open flag will cause some outputs to not function, such as OnFullyClosed.
  • 1 : Starts Open - This door spawns open.
  • 4 : Non-solid to Player - The player does not collide with this door.
  • 8 : Passable - Nothing collides with this door.
  • 32 : Toggle - The door is given an input to change this door between open and shut.
  • 256 :Use Opens - The +use key, when in range, triggers this door.
  • 512 : NPCs Can't - NPCs can't open this door.
  • 1024 : Touch Opens - When a player or NPC collides with this door, it is triggered.
  • 2048 : Starts locked - This door spawns locked and cannot be opened by the player or NPC (but buttons can still trigger it)
  • 4096 : Door Silent - This door makes no noise.



Control the state of the door.
Lock or unlock the door.
SetSpeed <float>
Set the door's movement speed.


Turn shadow off.
Turn shadow on.
DisableReceivingFlashlight  (New with Portal 2)
This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight  (New with Portal 2)
This object may receive light or shadows from projected textures.


Alpha  <integer>
Set the sprite's alpha (0 - 255).
Color  <color255>
Set the sprite's color (R G B).


SetParent  <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment  <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset  <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Removes this entity from the the movement hierarchy, leaving it free to move independently.


Removes this entity and any entities parented to it from the world.
Functions the same as Kill, although entities with a large number of children are killed marginally faster.
AddOutput  <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning:Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
Note:This input is missing from some games FGD files.
SetLocalOrigin  <origin> (New with Alien Swarm) !FGD
Set this entity's origin in the map.
Note:This input is missing from some games FGD files.
SetLocalAngles  <angles> (New with Alien Swarm) !FGD
Set this entity's angles in the map.
Note:This input is missing from some games FGD files.



Fired when the door starts to to open or close.
Fired when the door finishes opening or closing. Reversed if 'Start Open' flag is set.
Fired when the door has been blocked from closing or opening. (activator is the blocking entity)
Fired when the door is no longer blocked from closing or opening.
Fired when the player uses the door, but it is locked.


OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (New with Left 4 Dead)
This Output fires when the entity is killed and removed from the game.

See also