Func button: Difference between revisions
Jump to navigation
Jump to search
Bug:Do not lock while pressed; it will not return when unlocked. [todo tested in ?]
Spazzing K-9 (talk | contribs) (added sound file descriptions for plunger and buzz off (both are hl1 sounds by the way)) |
(added Use Look-At Limit, a keyvalue for CSGO) |
||
| Line 198: | Line 198: | ||
|} | |} | ||
{{KV|Minimum Light Level|string|The minimum level of ambient light that hits this brush.}} | {{KV|Minimum Light Level|string|The minimum level of ambient light that hits this brush.}} | ||
{{KV|Use Look-At Limit ({{game link|Counter-Strike: Global Offensive}} only)|string|Limit the usable look-at angle. -1 is looking directly away, 0 is looking perpendicular, 1 is looking directly at.}} | |||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV Parentname}} | {{KV Parentname}} | ||
Revision as of 14:13, 18 April 2016
Entity description
It is designed to be used for a player-usable button. When used by the player, it moves to a pressed position.
Template:Brushmodel
For an example of a func_button used to make a keypad, see the button_keypad prefab.
Keyvalues
- Move Direction (Pitch Yaw Roll) ([todo internal name (i)]) <angle>
- Specifies the direction of motion to move when the button is used.
- Health (Obsolete) ([todo internal name (i)]) <integer>
- Legacy method of specifying whether or not the button can be shot to activate it. Use the 'Damage Activates' spawnflag instead.
- Lip ([todo internal name (i)]) <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.
- Master (Obsolete) ([todo internal name (i)]) <string>
- Legacy support: The name of a master entity. If the master hasn't been activated, this button cannot be pressed.
- Sounds ([todo internal name (i)]) <choices>
Value Description Default Sound 0None (Silent) NULL.WAV 1Big zap & Warmup button1.wav 2Access Denied button2.wav 3Access Granted button3.wav 4Quick Combolock button4.wav 5Power Deadbolt 1 button5.wav 6Power Deadbolt 2 button6.wav 7Plunger button7.wav 8Small zap button8.wav 9Keycard Sound button9.wav 10Buzz button10.wav 11Buzz Off button11.wav 12latch locked door_locked2.wav 13Latch Unlocked door_latch3.wav 14Lightswitch lightswitch2.wav 15small bleek button15.wav 16small deny button16.wav 17small doop button19.wav 18small tech deny button18.wav 19click and combine screen fuzz button19.wav 20roomy beep 21lever or wheel: turn + move sqeek lever1.wav 22lever or wheel: latch + release gas lever2.wav 23lever or wheel: ratchet + sqeek lever3.wav 24lever or wheel: large ratchet lever4.wav 25lever or wheel: clanky + gas release lever5.wav 26lever or wheel: latch + large metal thud lever6.wav 27lever or wheel: smaller ratchet lever7.wav 28lever or wheel: smaller lever move lever8.wav 31shock buzz 32clickbeep 33tech blip 34clickbeepbeep open button24.wav 35small high blip 36small tech fuzz blip 37small click bleep (change to lightswitch) button24.wav 40combine door lock - locked combine_button_locked.wav 41combine blip growl combine_button1.wav 42combine squick growl combine_button2.wav 43combine whine purr combine_button3.wav 44combine click talk 45combine click growl fizz combine_button5.wav 46combine click fizz (deny) 47combine click talker combine_button7.wav
- Delay Before Reset (-1 stay) ([todo internal name (i)]) <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.
- Locked Sound ([todo internal name (i)]) <choices>
- Sound played when the player tries to use the button, and fails because it's locked.
Value Description Default Sound 0None NULL.wav 2Access Denied button2.wav 8Small zap button8.wav 10Buzz button10.wav 11Buzz Off button11 12Latch Locked door_locked2.wav
- Unlocked Sound ([todo internal name (i)]) <choices>
- Sound played when the button is unlocked.
Value Description Default Sound 0None 1Big zap & Warmup button1.wav 3Access Granted button3.wav 4Quick Combolock button4.wav 5Power Deadbolt 1 button5.wav 6Power Deadbolt 2 button6.wav 7Plunger button7.wav 8Small zap button8.wav 9Keycard Sound button9.wav 10Buzz button10.wav 13Latch Unlocked door_latch3.wav 14Lightswitch lightswitch2.wav
- Locked Sentence ([todo internal name (i)]) <choices>
- A sentence played when the player tries to use the button, and fails because it's locked.
Value Description 0None 1Gen. Access Denied 2Security Lockout 3Blast Door 4Fire Door 5Chemical Door 6Radiation Door 7Gen. Containment 8Maintenance Door 9Broken Shut Door
- Unlocked Sentence ([todo internal name (i)]) <choices>
- A sentence played when the button is unlocked.
Value Description 0None 1Gen. Access Granted 2Security Disengaged 3Blast Door 4Fire Door 5Chemical Door 6Radiation Door 7Gen. Containment 8Maintenance area
- Minimum Light Level ([todo internal name (i)]) <string>
- The minimum level of ambient light that hits this brush.
- Use Look-At Limit (Template:Game link only) ([todo internal name (i)]) <string>
- Limit the usable look-at angle. -1 is looking directly away, 0 is looking perpendicular, 1 is looking directly at.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Parentname:
- Parent (parentname) <targetname>
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
Origin:
- Origin (X Y Z) (origin) <origin>
- The position of this entity's center in the world. Rotating entities typically rotate around their origin.
RenderFields:
- Render Mode (rendermode) <byte choices>
- Set a non-standard rendering mode on this entity.
Render Modes
- Render FX (renderfx) <byte choices>
- Various somewhat legacy alpha effects. See render effects.
- Render Amount / Transparency (renderamt) <byte>
- Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
- Render Color (R G B) (rendercolor) <color255>
- Color tint.
DamageFilter:
- Damage Filter (damagefilter) <targetname>
- Name of the filter_damage_type entity that controls which entities can damage us.
Flags
- 1 : Don't move
- 32 : Toggle
- 256 : Touch Activates
- 512 : Damage Activates
- 1024 : Use Activates
- 2048 : Starts locked
- 4096 : Sparks
Inputs
Parentname:
- SetParent <string>
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <string>
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- SetParentAttachmentMaintainOffset <string>
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
RenderFields:
- Alpha <integer 0–255>
- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its
rendermodeset to a number other than0.
- Color <color255>
- Sets an RGB color for the entity.
DamageFilter:
- SetDamageFilter <string>
- Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.
Button:
- Lock
- Lock the button, preventing it from functioning.
- Unlock
- Unlock the button, allowing it to function.
- Press
- Activate the button as if it was pressed.
- PressIn
- Activate the button as if it was pressed, sending it to the bottom position.
- PressOut
- Unpress the button, sending it to the top position.
Outputs
Button:
- OnDamaged
- Fired when the button is damaged.
- OnPressed
- Fired when the button is pressed.
- OnUseLocked
- Fired when the button is used while locked.
- OnIn
- Fired when the button reaches the in/pressed position.
- OnOut
- Fired when the button reaches the out/released position.