Func button timed: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(-added class hierarchy, cleanup)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{this is a|brush entity|name=func_button_timed|series=Left 4 Dead}} It is a button that takes time to use.
{{CD|CButtonTimed}}
{{This is a|brush entity|name=func_button_timed|series=Left 4 Dead}} It is a button that takes time to use.


== Keyvalues ==
== Keyvalues ==
{{KV Targetname}}
{{KV|Use Time|intn=use_time|integer|The amount of time player must hold down [[use]], in seconds.}}
{{KV|Use Time|intn=use_time|integer|The amount of time player must hold down [[use]], in seconds.}}
{{KV|Use String|intn=use_string|string|The text/string that appears on the progress bar while the player is holding down use. }}
{{KV|Use String|intn=use_string|string|The text/string that appears on the progress bar while the player is holding down use. }}
Line 15: Line 17:
*11: Buzz Off
*11: Buzz Off
*12: Latch Locked
*12: Latch Locked
{{KV Targetname}}
{{KV Parentname}}
{{KV Origin}}
{{KV RenderFields}}
{{KV DamageFilter}}


== Flags ==
== Flags ==
* 2048 : Starts locked
{{fl|2048|Starts locked}}


== Inputs ==
== Inputs ==
{{IO|Lock|Lock the button, preventing it from functioning and playing a locked sound.}}
{{I|Lock|Lock the button, preventing it from functioning and playing a locked sound.}}
{{IO|Unlock|Unlock the button, allowing it to function.}}
{{I|Unlock|Unlock the button, allowing it to function.}}
{{IO|Enable|Enable the button, so it glows and can be used.}}
{{I|Enable|Enable the button, so it glows and can be used.}}
{{IO|Disable|Disable the button, so it can't be used and doesn't glow.}}
{{I|Disable|Disable the button, so it can't be used and doesn't glow.}}
{{I Targetname}}
{{I Parentname}}
{{I RenderFields}}
{{I DamageFilter}}


== Outputs ==
== Outputs ==
{{IO|OnPressed|Fired when the button is pressed.}}
{{O|OnPressed|Fired when the button is pressed.}}
{{IO|OnUnPressed|Fired when the button is unpressed.}}
{{O|OnUnPressed|Fired when the button is unpressed.}}
{{IO|OnTimeUp|Fired when the button has been held more than the required amount of time.}}
{{O|OnTimeUp|Fired when the button has been held more than the required amount of time.}}
{{IO|OnUseLocked|Fired when the button is used while locked.}}
{{O|OnUseLocked|Fired when the button is used while locked.}}
{{O Targetname}}

Revision as of 07:03, 12 October 2024

English (en)Translate (Translate)
C++ Class hierarchy
CButtonTimed
CBaseButton
CBaseToggle
CBaseEntity

func_button_timed is a brush entity available in Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series. It is a button that takes time to use.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Use Time (use_time) <integer>
The amount of time player must hold down use, in seconds.
Use String (use_string) <string>
The text/string that appears on the progress bar while the player is holding down use.
Use Sub-String (use_sub_string) <string>
A sub-string that appears below the Use String.
Glow Entity (glow) <targetname>
The name of an entity that will get the +use glow for this button.
Auto-Disable On Time Up (auto_disable) <boolean>
When the use timer is up, disable the button. (Can be enabled with an input)
Locked Sound (locked_sound) <choices>
Sound played when the player tries to use the button, and fails because it's locked.
  • 0: None
  • 2: Access Denied
  • 8: Small zap
  • 10: Buzz
  • 11: Buzz Off
  • 12: Latch Locked

Flags

Starts locked : [2048]

Inputs

Lock
Lock the button, preventing it from functioning and playing a locked sound.
Unlock
Unlock the button, allowing it to function.
Enable
Enable the button, so it glows and can be used.
Disable
Disable the button, so it can't be used and doesn't glow.

Outputs

OnPressed
Fired when the button is pressed.
OnUnPressed
Fired when the button is unpressed.
OnTimeUp
Fired when the button has been held more than the required amount of time.
OnUseLocked
Fired when the button is used while locked.