Difference between revisions of "func door"

From Quake Wiki

m (fixed displayname)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:func_door}}
 
{{DISPLAYTITLE:func_door}}
  
This is a [[brush entity]] that can move in the level. As the name implies it is commonly used for doors, however its movement is also useful in implementing simple moving objects such as lifts or extending platforms. It can be made to open in any horizontal direction, or straight up or down, but the standard Quake entities were not capable of rotation, unlike many recent patches such as the Ritual and Rogue add-on mission packs, and Hexen2, but clever map designers can still make interesting effects with a little time and imagination. To place a door in your map, create the brush you wish to use as the door, then turn it into a func_door entity.
+
The '''func_door''' is a solid [[brush entity]] that can move in the level. As the name implies it is commonly used for doors, however its movement is also useful in implementing simple moving objects such as lifts or extending platforms. It can be made to open in any horizontal direction, or straight up or down, but in standard Quake it cannot be made to rotate.
 +
 
 +
== Usage ==
 +
The [[Door tutorial]] article has some examples of the creation and use of a func_door entity.
 +
{{todo|user=Hectate|todo=Create a func_door tutorial!}}
 +
 
 +
=== Movement ===
 +
When triggered, doors move in a straight line until fully open, then wait a short time, then close by moving back to the starting position. The direction of travel is controlled by the ''angle'' value.  The distance traveled is equal to the width of the door in that direction, less an amount specified by the ''lip'' value.
 +
 
 +
=== Triggering ===
 +
By default doors will automatically open when a player or monster is near, and close when they leave.  This only happens if the door is not locked and doesn't have a ''targetname''.
 +
 
 +
If a door has a ''targetname'', it will only open if another entity triggers it, such as a button or trigger.
 +
 
 +
If a door is locked, it will only open if the player touches it while holding the correct key.  If this happens, the door will open and stay open permanently, and the player loses the key.
 +
 
 +
=== Message ===
 +
A locked door, or a door with a ''targetname'', will display a ''message'' if the player touches it while it is closed (except when the player has the key for the locked door.)
 +
 
 +
=== Linking ===
 +
By default multiple doors that touch (or have overlapping bounding boxes) will be linked, so that if one opens they will all open.  This can be used to make a multi-part door.  To disable this behavior use the "Don't Link" spawnflag.
  
 
== Attributes ==
 
== Attributes ==
func_door has the following attributes in [[Worldcraft]]. These may also be known as [[keyvalues]].
 
 
* Angle : The direction of motion for the entity when triggered
 
* Name / Targetname : Give the entity a name for identification by other entities. ''Only'' use this if you want the door to be locked until triggered by something else, such as a button.
 
* Target : Give the entity a target entity to trigger
 
* Killtarget : Give the entity a target entity to kill
 
* Speed : Speed of movement when triggered
 
* Sounds : Type of sounds produced by the entity when triggered. The selection is limited to the following options:
 
** None (value 0)
 
** Stone (value 1)
 
** Machine (value 2)
 
** Stone Chain (value 3)
 
** Screechy Metal (value 4)
 
** Custom Sounds (value 5)
 
* Move sound / noise2 : The sound to play during movement if custom sounds are being used
 
* Stop sound / noise1 : The sound to play when motion stops if custom sounds are being used
 
* Delay before close / Wait : The time in seconds before the motion reverses to return the entity to the original position
 
* Lip : The amount of additional distance to add to the motion. The default amount is equal to the width of the brush in the direction of motion. This value can be positive or negative; positive values reduce the distance while negative values increase the distance.
 
* Damage inflicted when blocked : The amount of damage to apply to an entity that attempts to block the motion of the door
 
* Message if triggered / message : Sends a message to display on the player's screen when triggered
 
* Health (shoot open) : Amount of damage required to be done to the entity to trigger motion
 
  
== Flags ==
+
=== Keys ===
func_door has the following entity [[spawnflags]]:
+
{| class="wikitable"
 +
|-
 +
| ! bgcolor="#eeeeee" width="80px" | ''targetname'' || The name of the door. ''Only'' use this if you want the door to be locked until triggered by something else, such as a [[func_button|button]].
 +
|-
 +
| ! bgcolor="#eeeeee" | ''target'' || The targetname of the entity that will be triggered when the door is triggered.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''killtarget'' || The targetname of the entity that will be killed when the door is triggered.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''angle'' || Sets the direction the door should move when it opens.  Angles from 0 to 359 will make it move horizontally.  You can also set the motion to be vertical by setting the angle to -1 (upward motion) or -2 (downward motion) instead.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''wait'' || Time after opening for it to reset and be triggerable again. Setting this to -1 will cause the door to remain open.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''speed'' || The movement speed of the door.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''lip'' || An offset added to the default movement distance that allows the designer to adjust the amount the door travels. This value can be positive or negative; positive values reduce the distance while negative values increase the distance.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''health'' || If set to any value above 0, the door will only be activated by shooting it or hitting it with the axe. Often used for secret doors. The door will not trigger until the damage exceeds the health value.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''message'' || A message to display when the player touches the door in its closed state.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''sounds'' || Type of sounds produced by the entity when triggered. The selection is limited to the following options:
 +
* None (value 0)
 +
* Stone (value 1)
 +
* Machine (value 2)
 +
* Stone Chain (value 3)
 +
* Screechy Metal (value 4)
 +
* Custom Sounds (value 5)
 +
|-
 +
| ! bgcolor="#eeeeee" | ''noise2'' || The sound to play during movement if custom sounds are being used
 +
|-
 +
| ! bgcolor="#eeeeee" | ''noise1'' || The sound to play when motion stops if custom sounds are being used
 +
|-
 +
| ! bgcolor="#eeeeee" | ''dmg'' || The amount of damage to apply to an entity that attempts to block the motion of the door.
 +
|}
  
* Starts open : The entity is moved to the open position for it's initial state
+
===Spawnflags===
* Don't link : Restricts the entity from being linked to a matching door (preventing it from opening as part of a pair)
+
The button supports [[Entity#Spawnflags|standard spawnflags]] for difficulty and deathmatch presence.
* Gold key required : The entity will not move unless the player has collected the Gold Key
+
{| class="wikitable collapsible collapsed"
* Silver key required : The entity will not move unless the player has collected the Silver key
+
|-
* Toggle : The entity will toggle between open and closed states instead of automatically closing after a delay
+
! Flag !! Common Name
* Not in Easy : The entity will not exist if the player is in Easy difficulty mode
+
|-
* Not in Normal : The entity will not exist if the player is in Normal difficulty mode
+
| 256 || Not on Easy
* Not in Hard : The entity will not exist if the player is in Hard difficulty mode
+
|-
* Not in Deathmatch : The entity will not exist if the game is a Deathmatch game
+
| 512 || Not on Normal
 +
|-
 +
| 1024 || Not on Hard
 +
|-
 +
| 2048 || Not in Deathmatch
 +
|}
 +
It also has the following additional flags enabled:
 +
{| class="wikitable"
 +
|-
 +
! Flag !! Common Name !! Description
 +
|-
 +
| 1 || Starts open ||| The entity is moved to the open position for its initial state
 +
|-
 +
| 4 || Don't link ||| Restricts the entity from being linked to a matching door (preventing it from opening as part of a pair)
 +
|-
 +
| 8 || Gold key required ||| The entity will not move unless the player has collected the Gold Key
 +
|-
 +
| 16 || Silver key required ||| The entity will not move unless the player has collected the Silver key
 +
|-
 +
| 32 || Toggle ||| The entity will toggle between open and closed states instead of automatically closing after a delay
 +
|}
  
 
[[Category:Quake entities]]
 
[[Category:Quake entities]]

Latest revision as of 01:52, 10 April 2013


The func_door is a solid brush entity that can move in the level. As the name implies it is commonly used for doors, however its movement is also useful in implementing simple moving objects such as lifts or extending platforms. It can be made to open in any horizontal direction, or straight up or down, but in standard Quake it cannot be made to rotate.

Usage[edit]

The Door tutorial article has some examples of the creation and use of a func_door entity.

Hectate added a To-Do; Create a func_door tutorial!.

Movement[edit]

When triggered, doors move in a straight line until fully open, then wait a short time, then close by moving back to the starting position. The direction of travel is controlled by the angle value. The distance traveled is equal to the width of the door in that direction, less an amount specified by the lip value.

Triggering[edit]

By default doors will automatically open when a player or monster is near, and close when they leave. This only happens if the door is not locked and doesn't have a targetname.

If a door has a targetname, it will only open if another entity triggers it, such as a button or trigger.

If a door is locked, it will only open if the player touches it while holding the correct key. If this happens, the door will open and stay open permanently, and the player loses the key.

Message[edit]

A locked door, or a door with a targetname, will display a message if the player touches it while it is closed (except when the player has the key for the locked door.)

Linking[edit]

By default multiple doors that touch (or have overlapping bounding boxes) will be linked, so that if one opens they will all open. This can be used to make a multi-part door. To disable this behavior use the "Don't Link" spawnflag.

Attributes[edit]

Keys[edit]

targetname The name of the door. Only use this if you want the door to be locked until triggered by something else, such as a button.
target The targetname of the entity that will be triggered when the door is triggered.
killtarget The targetname of the entity that will be killed when the door is triggered.
angle Sets the direction the door should move when it opens. Angles from 0 to 359 will make it move horizontally. You can also set the motion to be vertical by setting the angle to -1 (upward motion) or -2 (downward motion) instead.
wait Time after opening for it to reset and be triggerable again. Setting this to -1 will cause the door to remain open.
speed The movement speed of the door.
lip An offset added to the default movement distance that allows the designer to adjust the amount the door travels. This value can be positive or negative; positive values reduce the distance while negative values increase the distance.
health If set to any value above 0, the door will only be activated by shooting it or hitting it with the axe. Often used for secret doors. The door will not trigger until the damage exceeds the health value.
message A message to display when the player touches the door in its closed state.
sounds Type of sounds produced by the entity when triggered. The selection is limited to the following options:
  • None (value 0)
  • Stone (value 1)
  • Machine (value 2)
  • Stone Chain (value 3)
  • Screechy Metal (value 4)
  • Custom Sounds (value 5)
noise2 The sound to play during movement if custom sounds are being used
noise1 The sound to play when motion stops if custom sounds are being used
dmg The amount of damage to apply to an entity that attempts to block the motion of the door.

Spawnflags[edit]

The button supports standard spawnflags for difficulty and deathmatch presence.

It also has the following additional flags enabled:

Flag Common Name Description
1 Starts open The entity is moved to the open position for its initial state
4 Don't link Restricts the entity from being linked to a matching door (preventing it from opening as part of a pair)
8 Gold key required The entity will not move unless the player has collected the Gold Key
16 Silver key required The entity will not move unless the player has collected the Silver key
32 Toggle The entity will toggle between open and closed states instead of automatically closing after a delay