func_door

From Quake Wiki

Revision as of 20:48, 28 March 2013 by Hectate (talk | contribs) (Keys: corrected a name)


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.

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

Attributes

As mentioned above, the door will open in the direction of whatever angle you set it. The default distance covered is equal to the width of the door in that direction. You can also set the motion to be vertical by setting the angle to -1 (upward motion) or -2 (downward motion) instead.

Keys

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.
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 door triggers.
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

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 it's 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