BRUSH func_button

A brush entity that's designed to be used for a player-useable button. When used by the player, it moves to a pressed position. Do not lock while pressed; it will not return when unlocked.

KeyValues

Move Direction (Pitch Yaw Roll) <angle> = 0 0 0

Specifies the direction of motion to move when the button is used.

Speed <float> = 5

The speed that the button moves, in units per second.

Health (Obsolete) <integer> = 0

Legacy method of specifying whether or not the button can be shot to activate it. Use the 'Damage Activates' spawnflag instead.

Lip <float> = 0

The amount the button will keep overlapping with the original position. The distance moved = the size of the brush on the movement axis - lip.

Delay Before Reset (-1 stay) <float> = 3

Amount of time, in seconds, after the button has been pressed before it returns to the starting position. Once it has returned, it can be used again. If the value is set to -1, the button never returns.

spawnflags <flags>

No description provided.

Possible Flags:

NameValueDefault
Don't move1
Toggle32
Touch Activates256
Damage Activates512
Use Activates1024
Starts locked2048
Sparks4096
Non-solid16384

Sound Name <sound>

The .wav(!!) sound file to use. (Only used when old 'sounds' keyvalue isn't set)

Use Look-At Limit <float> = 0.8

Limit the usable look-at-angle. -1 is looking directly away, 0 is looking perpendicular, 1 is looking directly at.

Inherited from BaseEntityVisBrush

Effect Flags <choices> = None (0)

For configuring visual effects. If you want to combine effects, turn SmartEdit off and add the effect numbers together, i.e. 64 + 8 = 72.

Possible Values:

NameValue
None0
Bonemerge always, very expensive!!1
Bright, dynamic light at entity origin2
Dim, dynamic light at entity origin4
No movement interpolation8
Don't cast shadows16
Don't draw entity (entity is fully ignored by clients, NOT server)32
Don't receive dynamic shadows64
Bonemerge only in PVS, better performance but prone to disappearing. Use with Bonemerge.128
Blinking glow256
Flag parent as always animating and realign each frame512
Mark for fast reflections1024
No shadow depth, for use with env_cascade_light2048
Dont cache in shadow depthmap (render every frame)4096
No flashlight8192
No CSM16384

VRAD Shadows <choices> = Do not cast shadows (0)

Determines if this entity will cast lightmap shadows.

Possible Values:

NameValue
Do not cast shadows0
Cast shadows1

Minimum Light Level <float> = 0

The minimum level of ambient light that hits this brush.

Disable Receiving Shadows? <boolean> = No

Prevents dynamic shadows (e.g. player and prop shadows) from appearing on this entity.

Disable ShadowDepth <boolean> = No

Used to disable rendering into shadow depth (for flashlight) for this entity.

Projected Texture Cache <choices> = Default (0)

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.

Possible Values:

NameValue
Default0
No cache = render every frame1
Cache it = render only once2

Disable flashlight <boolean> = No

Used to disable flashlight (env_projectedtexture) lighting and shadows on this entity.

Inherited from BaseEntityBrush

Name <target_source>

The name that other entities refer to this entity by.

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.

Origin (X Y Z) <origin>

The position of this brush entity's center in the world. Rotating entities typically rotate around their origin.

Parent <target_destination>

The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent. Set an attachment point via 'parentname,attachment'.

Minimum Bounding Box Size <vector>

Co-ordinate of the minimum bounding box corner, relative to entity origin. The bounding box is drawn from this corner to the other one. Requires Bounding Box collisions (solid 2) to be used. Can be used to overwrite the collision shape of a brush, although it can only be a cuboid. Can be AddOutputed to change shape at runtime.

Maximum Bounding Box Size <vector>

Co-ordinate of the maximum bounding box corner, relative to entity origin. The bounding box is drawn from this corner to the other one. Requires Bounding Box collisions (solid 2) to be used. Can be used to overwrite the collision shape of a brush, although it can only be a cuboid. Can be AddOutputed to change shape at runtime.

Collisions <choices> = VPhysics (6)

Method of collision for this entity. Can be changed at runtime with AddOutput.

Possible Values:

NameValue
None0
BSP (QPhysics)1
Bounding Box2
Oriented Bounding Box3
Oriented Bounding Box, constrained to Yaw only4
Custom (defined per-entity, if not defined the entity will have bizarre collision behavior)5
VPhysics6

Inherited from RenderFields

Render Mode <choices> = Normal (0)

Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.* Color & Texture = srca+dest(1-a)* Glow = srca + dest, fixed on screen for sprites Solid = Performs alphatest transparency* Additive = srca + dest Additive FF = blend between sprite nimation frames* Alpha Add = src + dest*(1-a)* World Space Glow = src*a + dest

Possible Values:

NameValue
Normal0
Color1
Texture2
Glow3
Solid4
Additive5
Additive Fractional Frame7
Additive Alpha8
World Space Glow9
Don't Render10

FX Color (R G B) <color255> = 255 255 255

A color to mix with the model/sprite.

FX Alpha (0 - 255) <integer> = 255

Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.

Render FX <choices> = Normal (0)

Various somewhat legacy alpha effects. Material Proxies are more modern.

Possible Values:

NameValue
Normal0
Slow Pulse1
Fast Pulse2
Slow Wide Pulse3
Fast Wide Pulse4
Slow Strobe9
Fast Strobe10
Faster Strobe11
Slow Flicker12
Fast Flicker13
Slow Fade Away5
Fast Fade Away6
Slow Become Solid7
Fast Become Solid8
Constant Glow14
Fade Out15
Fade In16
Pulse Fast Wider17
Glow Shell18

Disable Receiving Shadows <boolean> = No

No description provided.

View ID nodraw <choices> = Draw normally (0)

This keyvalue can control whether an entity should only draw on things like monitors or mirrors, or the opposite. The code for this is { m_iViewHideFlags & (1 << CurrentViewID()) } and supports any combination of view IDs.

Possible Values:

NameValue
Draw normally0
Hide in main view (player's eyes)193
Hide in cameras36
Hide in mirrors/water24
Hide in cameras and mirrors/water60
Hide in 3D skybox2
Hide projected texture shadows128

Inherited from Button

Press Sound <choices> = None (Silent) (0)

Sound played when pressed. Choose from sounds in the Buttons.snd* category.

Possible Values:

NameValue
None (Silent)0
Light Switch100
Power Plug - Basic Electronics (soft)101
Buttons.snd1: Big zap & Warmup1
Buttons.snd2: Access Denied2
Buttons.snd3: Access Granted3
Buttons.snd4: Quick Combolock4
Buttons.snd5: Power Deadbolt 15
Buttons.snd6: Power Deadbolt 26
Buttons.snd7: Plunger7
Buttons.snd8: Small zap8
Buttons.snd9: Keycard Sound9
Buttons.snd10: Buzz10
Buttons.snd11: Buzz Off11
Buttons.snd12: Latch locked12
Buttons.snd13: Latch Unlocked13
Buttons.snd14: Lightswitch14
Buttons.snd15: Small bleek15
Buttons.snd16: Small deny16
Buttons.snd17: Small doop17
Buttons.snd18: Small tech deny18
Buttons.snd19: Click and combine screen fuzz19
Buttons.snd20: Roomy beep20
Buttons.snd21: Lever or Wheel: turn + move sqeek21
Buttons.snd22: Lever or Wheel: latch + release gas22
Buttons.snd23: Lever or Wheel: ratchet + sqeek23
Buttons.snd24: Lever or Wheel: large ratchet24
Buttons.snd25: Lever or Wheel: clanky + gas release25
Buttons.snd26: Lever or Wheel: latch + large metal thud26
Buttons.snd27: Lever or Wheel: smaller ratchet27
Buttons.snd28: Lever or Wheel: smaller lever move28
Buttons.snd31: Shock buzz (missing)31
Buttons.snd32: Clickbeep (missing)32
Buttons.snd33: Tech blip (missing)33
Buttons.snd34: Clickbeepbeep open34
Buttons.snd35: Small high blip35
Buttons.snd36: Small tech fuzz blip36
Buttons.snd37: Small click bleep (change to lightswitch)37
Buttons.snd40: Combine door lock - locked40
Buttons.snd41: Combine blip growl41
Buttons.snd42: Combine squick growl42
Buttons.snd43: Combine whine purr43
Buttons.snd44: Combine click talk44
Buttons.snd45: Combine click growl fizz45
Buttons.snd46: Combine click fizz (deny)46
Buttons.snd47: Combine click talker47

Locked Sound <choices> = None (Silent) (0)

Sound played when the player tries to use the button, and fails because it's locked. These are sounds in the Buttons.snd* category.

Possible Values:

NameValue
None (Silent)0
Light Switch100
Power Plug - Basic Electronics (soft)101
Buttons.snd1: Big zap & Warmup1
Buttons.snd2: Access Denied2
Buttons.snd3: Access Granted3
Buttons.snd4: Quick Combolock4
Buttons.snd5: Power Deadbolt 15
Buttons.snd6: Power Deadbolt 26
Buttons.snd7: Plunger7
Buttons.snd8: Small zap8
Buttons.snd9: Keycard Sound9
Buttons.snd10: Buzz10
Buttons.snd11: Buzz Off11
Buttons.snd12: Latch locked12
Buttons.snd13: Latch Unlocked13
Buttons.snd14: Lightswitch14
Buttons.snd15: Small bleek15
Buttons.snd16: Small deny16
Buttons.snd17: Small doop17
Buttons.snd18: Small tech deny18
Buttons.snd19: Click and combine screen fuzz19
Buttons.snd20: Roomy beep20
Buttons.snd21: Lever or Wheel: turn + move sqeek21
Buttons.snd22: Lever or Wheel: latch + release gas22
Buttons.snd23: Lever or Wheel: ratchet + sqeek23
Buttons.snd24: Lever or Wheel: large ratchet24
Buttons.snd25: Lever or Wheel: clanky + gas release25
Buttons.snd26: Lever or Wheel: latch + large metal thud26
Buttons.snd27: Lever or Wheel: smaller ratchet27
Buttons.snd28: Lever or Wheel: smaller lever move28
Buttons.snd31: Shock buzz (missing)31
Buttons.snd32: Clickbeep (missing)32
Buttons.snd33: Tech blip (missing)33
Buttons.snd34: Clickbeepbeep open34
Buttons.snd35: Small high blip35
Buttons.snd36: Small tech fuzz blip36
Buttons.snd37: Small click bleep (change to lightswitch)37
Buttons.snd40: Combine door lock - locked40
Buttons.snd41: Combine blip growl41
Buttons.snd42: Combine squick growl42
Buttons.snd43: Combine whine purr43
Buttons.snd44: Combine click talk44
Buttons.snd45: Combine click growl fizz45
Buttons.snd46: Combine click fizz (deny)46
Buttons.snd47: Combine click talker47

Unlocked Sound <choices> = None (Silent) (0)

Sound played when the button is unlocked. These are sounds in the Buttons.snd* category.

Possible Values:

NameValue
None (Silent)0
Light Switch100
Power Plug - Basic Electronics (soft)101
Buttons.snd1: Big zap & Warmup1
Buttons.snd2: Access Denied2
Buttons.snd3: Access Granted3
Buttons.snd4: Quick Combolock4
Buttons.snd5: Power Deadbolt 15
Buttons.snd6: Power Deadbolt 26
Buttons.snd7: Plunger7
Buttons.snd8: Small zap8
Buttons.snd9: Keycard Sound9
Buttons.snd10: Buzz10
Buttons.snd11: Buzz Off11
Buttons.snd12: Latch locked12
Buttons.snd13: Latch Unlocked13
Buttons.snd14: Lightswitch14
Buttons.snd15: Small bleek15
Buttons.snd16: Small deny16
Buttons.snd17: Small doop17
Buttons.snd18: Small tech deny18
Buttons.snd19: Click and combine screen fuzz19
Buttons.snd20: Roomy beep20
Buttons.snd21: Lever or Wheel: turn + move sqeek21
Buttons.snd22: Lever or Wheel: latch + release gas22
Buttons.snd23: Lever or Wheel: ratchet + sqeek23
Buttons.snd24: Lever or Wheel: large ratchet24
Buttons.snd25: Lever or Wheel: clanky + gas release25
Buttons.snd26: Lever or Wheel: latch + large metal thud26
Buttons.snd27: Lever or Wheel: smaller ratchet27
Buttons.snd28: Lever or Wheel: smaller lever move28
Buttons.snd31: Shock buzz (missing)31
Buttons.snd32: Clickbeep (missing)32
Buttons.snd33: Tech blip (missing)33
Buttons.snd34: Clickbeepbeep open34
Buttons.snd35: Small high blip35
Buttons.snd36: Small tech fuzz blip36
Buttons.snd37: Small click bleep (change to lightswitch)37
Buttons.snd40: Combine door lock - locked40
Buttons.snd41: Combine blip growl41
Buttons.snd42: Combine squick growl42
Buttons.snd43: Combine whine purr43
Buttons.snd44: Combine click talk44
Buttons.snd45: Combine click growl fizz45
Buttons.snd46: Combine click fizz (deny)46
Buttons.snd47: Combine click talker47

Locked Sentence <choices> = None (0)

A sentence played when the player tries to use the button, and fails because it's locked.

Possible Values:

NameValue
None0
[NA] Gen. Access Denied1
[ND] Security Lockout2
[NF] Blast Door3
[NFIRE] Fire Door4
[NCHEM] Chemical Door5
[NRAD] Radiation Door6
[NCON] Gen. Containment7
[NH] Maintenance Door8
[NG] Broken Shut Door9

Unlocked Sentence <choices> = None (0)

A sentence played when the button is unlocked.

Possible Values:

NameValue
None0
[EA] Gen. Access Granted1
[ED] Security Disengaged2
[EF] Blast Door3
[EFIRE] Fire Door4
[ECHEM] Chemical Door5
[ERAD] Radiation Door6
[ECON] gen. Containment7
[EH] Maintenance area8

Inherited from Angles

Pitch Yaw Roll (Y Z X) <angle> = 0 0 0

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.

Inputs

Inherited from BaseEntityVisBrush

DisableShadow <void>

Allows the entity to draw a render target (dynamic) shadow.

EnableShadow <void>

Prevents the entity from drawing a render target (dynamic) shadow.

DisableReceivingFlashlight <void>

This object will not recieve light or shadows from projected textures (flashlights).

EnableReceivingFlashlight <void>

This object may recieve light or shadows from projected textures (flashlights).

EnableDamageForces <void>

Damaging the entity applies physics forces to it.

DisableDamageForces <void>

Damaging the entity does not apply physics forces to it.

AlternativeSorting <boolean>

Used to attempt to fix sorting problems when rendering. True activates, false deactivates

Inherited from BaseEntityBrush

Kill <void>

Removes this entity from the world.

KillHierarchy <void>

Removes this entity and all its children from the world.

SetParent <target_destination>

Changes the entity's parent in the movement hierarchy.

SetParentAttachment <string>

Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.

SetParentAttachmentMaintainOffset <string>

Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.

ClearParent <void>

Removes this entity from the the movement hierarchy, leaving it free to move independently.

SetLocalAngles <vector>

Sets the rotation of the entity relative to the parent's rotation.

SetLocalOrigin <vector>

Sets the position of the entity relative to its parent if one exists. Otherwise relative to the world.

SetAbsAngles <vector>

Set this entity's angles, always relative to the world origin.

AddOutput <string>

Adds an entity I/O connection to this entity or changes keyvalues dynamically. Format: '<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite, 1 = only once)>' or 'keyvalue newval'. Very dangerous, use with care.

FireUser1 <void>

Causes this entity's OnUser1 output to be fired.

FireUser2 <void>

Causes this entity's OnUser2 output to be fired.

FireUser3 <void>

Causes this entity's OnUser3 output to be fired.

FireUser4 <void>

Causes this entity's OnUser4 output to be fired.

Use <void>

More or less replicates the player interacting with an entity. (+USE)

PassUser1 <string>

Causes this entity's OutUser1 output to be fired, passing along the parameter unchanged.

PassUser2 <string>

Causes this entity's OutUser2 output to be fired, passing along the parameter unchanged.

PassUser3 <string>

Causes this entity's OutUser3 output to be fired, passing along the parameter unchanged.

PassUser4 <string>

Causes this entity's OutUser4 output to be fired, passing along the parameter unchanged.

FireRandomUser <void>

Fires OnUser1, OnUser2, OnUser3, or OnUser4 with a 25% chance of each.

PassRandomUser <string>

Fires OutUser1, OutUser2, OutUser3, or OutUser4 with a 25% chance of each. The parameter is passed along unchanged.

KillIfNotVisible <void>

Removes this entity if it is not in the player's viewcone.

KillWhenNotVisible <void>

Removes this entity when it is not in the player's viewcone.

FireOutput <string>

Fires the named output on this entity. Format: '<output name>:<activator>:<caller>:<parameter>:<delay>' (OnDeath:hl3cardgame:gaben). Everything beyond the output name is optional.

RemoveOutput <string>

Removes all instances of the named output on this entity. Wildcards are supported, meaning you could just pass '*' to wipe all outputs from this entity.

AcceptInput <string>

Fires the named input on this entity. Format: '<input name>:<parameter>:<activator>:<caller>:<output ID>' (SetTarget:cheese). Everything beyond the input name is optional. Mind the fact this is arranged differently from FireOutput, having the parameter right after the input name.

CancelPending <void>

Cancels any events fired by this entity that are currently pending in the I/O event queue.

FreeChildren <void>

Unparents all direct children of this entity.

SetLocalVelocity <vector>

Sets this entity's current velocity.

SetLocalAngularVelocity <vector>

Sets this entity's current angular velocity.

AddSpawnFlags <integer>

Adds spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

RemoveSpawnFlags <integer>

Removes spawnflag(s) to this entity. Many spawnflags have their respective numbers suffixed in this FGD.

AddSolidFlags <integer>

Adds solid flags to this entity.

RemoveSolidFlags <integer>

Removes solid flags from this entity.

ChangeVariable <string>

Similar to AddOutput, except it changes an internal variable similar to logic_datadesc_accessor instead. Very dangerous, use with care.

SetHealth <integer>

Sets this entity's health.

AddHealth <integer>

Adds to this entity's health.

RemoveHealth <integer>

Removes from this entity's health.

SetMaxHealth <integer>

Sets this entity's max health.

SetEntityName <target_destination>

Sets this entity's name that other entities should refer to it by.

SetTarget <target_destination>

Sets this entity's target. This is specific to certain entities, particularly logic entities that involve a target.

SetOwnerEntity <target_destination>

Sets this entity's owner entity. This has nothing to do with parenting and has more to do with collision and kill credits.

SetThinkNull <void>

Sets this entity's general think function to null. Behavior varies from entity to entity..

Touch <target_destination>

Simulates this entity touching the specified entity.

Inherited from RenderFields

Alpha <integer>

Set the entity's alpha (0 - 255).

Color <color255>

Set the entity's color (R G B).

SetRenderMode <integer>

Sets this entity's render mode.

SetRenderFX <integer>

Sets this entity's render FX.

SetViewHideFlags <integer>

Sets this entity's view ID nodraw flags (takes raw flag combination).

AddEffects <integer>

Adds an entity effect.

RemoveEffects <integer>

Removes an entity effect.

EnableDraw <void>

Draws an entity if it is not drawn. Equivalent to RemoveEffects > 32.

DisableDraw <void>

Undraws an entity if it is drawn. Equivalent to AddEffects > 32.

AddEFlags <integer>

Adds an entity flag. NOTE: Entity flags are not the spawn flags you see in Hammer. Use AddSpawnFlags to add spawnflags.

RemoveEFlags <integer>

Removes an entity flag. NOTE: Entity flags are not the spawn flags you see in Hammer. Use RemoveSpawnFlags to remove spawnflags.

SetCollisionGroup <integer>

Sets this entity's collision group.

Inherited from Button

Lock <void>

Lock the button, preventing it from functioning.

Unlock <void>

Unlock the button, allowing it to function.

Press <void>

Activate the button as if it was pressed.

PressIn <void>

Activate the button as if it was pressed, sending it to the bottom position.

PressOut <void>

Unpress the button, sending it to the top position.

Outputs

Inherited from BaseEntityBrush

OnUser1 <void>

Fired in response to FireUser1 input.

OnUser2 <void>

Fired in response to FireUser2 input.

OnUser3 <void>

Fired in response to FireUser3 input.

OnUser4 <void>

Fired in response to FireUser4 input.

OutUser1 <string>

Fires in response to PassUser1 input, with the parameter passed through unchanged.

OutUser2 <string>

Fires in response to PassUser2 input, with the parameter passed through unchanged.

OutUser3 <string>

Fires in response to PassUser3 input, with the parameter passed through unchanged.

OutUser4 <string>

Fires in response to PassUser4 input, with the parameter passed through unchanged.

Inherited from Button

OnDamaged <void>

Fired when the button is damaged.

OnPressed <void>

Fired when the button is pressed.

OnUseLocked <void>

Fired when the button is used while locked.

OnIn <void>

Fired when the button reaches the in/pressed position.

OnOut <void>

Fired when the button reaches the out/released position.