infra_button

From Valve Developer Community
Jump to: navigation, search

<INFRA> infra_button is a brush entity available in INFRA.

Entity Description

It is a brush entity designed to be player-usable button. It is a mix between a door, a button and a rotating button.

Bug: The Delay Before Reset keyvalue is currently non-functional. As a alternative you can lock the button on use and then unlock it on a timer
Bug: The Locked Sound and Unlock Sound keyvalues currently do not play their sounds.

Keyvalues

Move Direction (Pitch Yaw Roll) <angle>
The direction the door will move, when it opens.

BaseDoor:

Linked Door (chainstodoor) <string> !FGD
Passes the door's +use inputs and touch events onto a different door, so it also is activated.
Block Filter Name (filtername) <targetname>
(For Half-Life: Source) Filter to use to determine entities that can block the door.
Speed (speed) <float>
Speed that the door moves, in units (sliding door) or degrees (rotating door) per second.
Start Sound (noise1) <sound>
Sound to play when the door starts moving (regardless of opening or closing).
Stop Sound (noise2) <sound>
Sound to play when the door stops moving (regardless of opening or closing).
Start Close Sound (startclosesound) <sound>
Sound to play when the door starts closing.
Stop Close Sound (closesound) <sound>
Sound to play when the door stops closing.
Delay Before Reset (wait) <float>
Time until the door returns to the closed position. A value of -1 means the door never auto-closes.
Lip (lip) <float>
When the door opens, it will move its full length minus this many units. Negative values will make the door move that many more than its length.
Blocking Damage (dmg) <float>
Amount of damage done to entities that block the movement of this door, per frame.
Bug: Normally a door will damage things blocking it, however if the player is teleported by a trigger_teleport while using noclip, they will not be damaged.
Force Closed (forceclosed) <boolean>
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 (ignoredebris) <boolean>
Changes the door's collision group to COLLISION_GROUP_INTERACTIVE, which ignores debris objects. Not compatible with the Non-solid to Player spawnflag as it also sets a collision group.
Health (health) <integer> <Obsolete>
Deprecated. Do not use.
Message If Triggered (message) <string> <Obsolete>
Deprecated. Do not use.
Locked Sound (locked_sound) <string>
Sound played when the player tries to open the door, and fails because it's locked.
Unlocked Sound (unlocked_sound) <string>
Sound played when door is unlocked.
Spawn Position (spawnpos) <choices>
State the door should begin in.
  • 0: Closed
  • 1: Open
Locked Sentence (locked_sentence) <choices> (Half-Life: Source)
Intercom voiceline for when the player tries to use the door, but it's locked.
Unlocked Sentence (unlocked_sentence) <choices> (Half-Life: Source)
Intercom voiceline for when the door is unlocked.
Loop Moving Sound? (loopmovesound) <boolean>
Makes the door's Start Sound loop until the door finishes moving.
Bug: 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.

Origin:

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

Flags

  • 1 : Starts Open - OBSOLETE, use 'Spawn Position' key instead
  • 4 : Non-solid to Player
  • 8 : Passable
  • 32 : Toggle
  • 256 : Use Opens
  • 512 : NPCs Can't
  • 1024 : Touch Opens
  • 2048 : Starts Locked
  • 4096 : Silent
  • 16384 : Can be held down

Inputs

Press
Presses it as if it was pressed by a player.

Door:

Open
Opens door.
Close
Closes door.
Toggle
Opens door if closed, closes door if opened.
Lock
Prevent door from opening, but can still close.
Unlock
Allow door to operate as normal.
SetSpeed
float

Outputs

OnStartPressing
Fired when the player starts pressing the button.
OnStopPressing
Fired when the player stops pressing the button.
OnPressed
Fired when pressed.
OnDamaged
Fired when damaged.

BaseDoor:

OnClose
Fired when the door starts to close.
OnOpen
Fired when the door starts to open.
OnFullyClosed
Fired when the door finishes closing. Reversed if Start Open flag is set.
OnFullyOpen
Fired when the door finishes opening. Reversed if Start Open flag is set.
OnBlockedClosing
Fired when the door has been blocked from closing. !activator is whatever blocks the door.
OnBlockedOpening
Fired when the door has been blocked from opening. !activator is whatever blocks the door.
OnUnblockedClosing
Fired when the door is no longer blocked from closing.
OnUnblockedOpening
Fired when the door is no longer blocked from opening.
OnLockedUse
Fired when the player tries to open the door but fails because it is locked.