Func button timed: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Use Sub-String is also in JBEP3)
 
(20 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{l4d series brush|func_button_timed}} It is an entity that takes time to [[use]].
{{LanguageBar}}
{{CD|CButtonTimed}}
{{This is a|brush entity|name=func_button_timed|game=Left 4 Dead|game1=Left 4 Dead 2|game2=Jabroni Brawl: Episode 3}} It is a button that takes time to use.


==Keyvalues==
== Keyvalues ==
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV|Use Time|intn=use_time|integer|The amount of time player must hold down [[use]], in seconds.}}
{{KV Origin}}
{{KV|Use String|intn=use_string|string|The text/string that appears on the progress bar while the player is holding down use. }}
{{KV RenderFields}}
{{KV|Use Sub-String|intn=use_sub_string|string|A sub-string that appears below the Use String.|only={{l4d2}}{{jbep3}}}}
{{KV DistanceFade}}
{{KV|Auto-Disable On Time Up|intn=auto_disable|boolean|When the use timer is up, disable the button. (Can be enabled with an input)}}
{{KV DamageFilter}}
*;Use Time <code><[[int]]></code>
:The amount of time player must hold down [[use]], in seconds.
*;Use String <code><[[string]]></code>
:The text/string that appears on the progress bar while the player is holding down use.
*;Use Sub-String <code><[[string]]></code>
:A sub-string that appears below the Use String.
*;Glow Entity
:Target entity to make glow. For example, the animated train car door prop that activates a tank spawning relay on successful use in The Sacrifice, map 1 (c7m1_docks).
*;Auto-Disable On Time Up <code><choices></code>
:When the use timer is up, disable the button. (Can be enabled with an input)
*;Locked Sound <code><choices></code>
:Sound played when the player tries to use the button, and fails because it's locked.


==Flags==
== Outputs ==
*1: Starts locked
{{O|OnTimeUp|Fired when the button has been held more than the required amount of time.}}
{{O|OnUnpressed|Fired when the button is unpressed.}}


==Inputs==
{{I Targetname}}
{{I Parentname}}
{{I DamageFilter}}
*;Lock
:Lock the button, preventing it from functioning and playing a locked sound.
*;Unlock
:Unlock the button, allowing it to function.
{{ScrollBox|title=EnableDisable|
; <code>Enable</code>
; <code>Disable</code>
: Enable/disable the button. Enable allows use of the entity and the button or target entity to glow. Disable turns off glow and the button cannot be used.
}}


==Outputs==
{{OtherKIO|func_button}}
{{O Targetname}}
*;OnPressed
:Fired when the button is pressed.
*;OnUnpressed
:Fired when the button is unpressed. For example, it is used to reset the animated model, such as a door.
*;OnTimeUp
:Fired when the button has been held more than the required amount of time.
*;OnUseLocked
:Fired when the button is used while locked.


==See also==
== See Also ==
*[[func_button]]
* {{l4d2}}{{ent|point_script_use_target}}
 
* {{ent|func_button}}
==External links==

Latest revision as of 11:50, 5 August 2025

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

func_button_timed is a brush entity available in Left 4 Dead Left 4 Dead, Left 4 Dead 2 Left 4 Dead 2, and Jabroni Brawl: Episode 3 Jabroni Brawl: Episode 3. 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> (only in Left 4 Dead 2Jabroni Brawl: Episode 3)
A sub-string that appears below the Use String.
Auto-Disable On Time Up (auto_disable) <boolean>
When the use timer is up, disable the button. (Can be enabled with an input)

Outputs

OnTimeUp
Fired when the button has been held more than the required amount of time.
OnUnpressed
Fired when the button is unpressed.


Note.pngNote:Other Keyvalues / Inputs / Outputs are same as func_button.

See Also