Func_button

Func_button

Table of contents
1 Entity Description
2 Keyvalues
3 Flags
4 Inputs
5 Outputs
6 See Also

Entity Description

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.

For an example of a func_button used to make a keypad, see the button_keypad prefab.


Keyvalues

<target_source> The name that other entities refer to this entity by.
<target_destination> The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
<origin> The position of this entity's center in the world. Rotating entities rotate around their origin.
<choice>
Literal Value Description
0 Normal
1 Slow Pulse
2 Fast Pulse
3 Slow Wide Pulse
4 Fast Wide Pulse
5 Slow Fade Away
6 Fast Fade Away
7 Slow Become Solid
8 Fast Become Solid
9 Slow Strobe
10 Fast Strobe
11 Faster Strobe
12 Slow Flicker
13 Fast Flicker
14 Constant Glow
15 Distort
16 Hologram (Distort + fade)
17 Scale up
22 Spotlight FX
23 Cull By Distance (TEST)
24 Fade Wider Pulse
<choices> Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.
Literal Value Render Mode Description (Click for more info.)
0 Normal Default rendering.
1 Color Obsolete.
2 Texture Plain opacity.
3 Glow No Z buffer checks. Fixed size on screen.
4 Solid / Alphatest Obsolete. (Use alphatest capabilities in materials instead.)
5 Additive Obsolete. Add this entity's color to what's behind it.
7 Additive Fractional Frame Obsolete? Blend between animation frames.
8 Alpha Add (Not in FGD.) TODO: Write description.
9 World Space Glow No Z buffer checks. Fixed size in world (as opposed to on screen).
10 Dont Render / None Don't render.
<integer> FX Amount (0 - 255) - How opaque the entity will be rendered. (0 is fully transparent, while 255 is fully opaque). Will not work if the rendermode keyvalue is set to Normal or Dont Render.
<color255> FX Color - What color the entity will be rendered in (to the degree of the opacity set with renderamt).
<angle> Specifies the direction of motion to move when the button is used.
<integer> The speed that the button moves, in inches per second.
<integer> Legacy method of specifying whether or not the button can be shot to activate it. Use the 'Damage Activates' spawnflag instead.
<integer> 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. Use a negative value to make it go further.
<choices>
Literal Value Description
0 None (Silent)
1 Big zap & Warmup
2 Access Denied
3 Access Granted
4 Quick Combolock
5 Power Deadbolt 1
6 Power Deadbolt 2
7 Plunger*
8 Small zap
9 Keycard Sound
10 Buzz
11 Buzz Off*
12 latch locked
13 Latch Unlocked
14 Lightswitch
15 small bleek
16 small deny
17 small doop
18 small tech deny
19 click and combine screen fuzz
20 roomy beep*
21 lever or wheel: turn + move sqeek
22 lever or wheel: latch + release gas
23 lever or wheel: ratchet + sqeek
24 lever or wheel: large ratchet
25 lever or wheel: clanky + gas release
26 lever or wheel: latch + large metal thud
27 lever or wheel: smaller ratchet
28 lever or wheel: smaller lever move
31 shock buzz*
32 clickbeep*
33 tech blip*
34 clickbeepbeep open
35 small high blip*
36 small tech fuzz blip*
37 small click bleep (change to lightswitch)
40 combine door lock - locked
41 combine blip growl
42 combine squick growl
43 combine whine purr
44 combine click talk*
45 combine click growl fizz
46 combine click fizz (deny)*
47 combine click talker
 Note: The samples marked with an asterisk (*) are missing and therefore doesn't play in-game.
<integer> 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.
<choices> Sound played when the player tries to use the button, and fails because it's locked.
Literal Value Description
0 None
2 Access Denied
8 Small zap
10 Buzz
11 Buzz Off
12 Latch Locked
<choices> Sound played when the button is unlocked.
Literal Value Description
0 None
1 Big zap & Warmup
3 Access Granted
4 Quick Combolock
5 Power Deadbolt 1
6 Power Deadbolt 2
7 Plunger
8 Small zap
9 Keycard Sound
10 Buzz
13 Latch Unlocked
14 Lightswitch
<choices> A sentence played when the player tries to use the button, and fails because it's locked.
Literal Value Description
0 None
1 Gen. Access Denied
2 Security Lockout
3 Blast Door
4 Fire Door
5 Chemical Door
6 Radiation Door
7 Gen. Containment
8 Maintenance Door
9 Broken Shut Door
<choices> A sentence played when the button is unlocked.
Literal Value Description
0 None
1 Gen. Access Granted
2 Security Disengaged
3 Blast Door
4 Fire Door
5 Chemical Door
6 Radiation Door
7 Gen. Containment
8 Maintenance area
<float> The minimum level of ambient light that hits this brush.

Flags


Inputs

Removes this entity from the world.
Removes this entity and all its children from the world.
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 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
Set the rendercolor.
Set the renderamt.
Changes the entity's parent in the movement hierarchy.
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.
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.
Removes this entity from the the movement hierarchy, leaving it free to move independently.
Lock the button, preventing it from functioning.
Unlock the button, allowing it to function.
Activate the button, as if it was pressed.

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs. !activator = activator
Fired when the button is damaged. !activator = damage inflictor
Fired when the button is pressed. !activator = activator
Fired when the button is used while locked. !activator = activator
Fired when the button reaches the in/pressed position. !activator = activator
Fired when the button reaches the out/released position. !activator = activator

See Also


К оглавлению справочника

© Valve Developer Community
CMT (CS Mapping Tutorials) - © 2006-2011+. Created by VM
[ Script Execution time: 0.004 ]