Func button timed: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Reformat)
Line 1: Line 1:
{{l4d series brush|func_button_timed}} It is an entity that takes time to [[use]].
{{l4d series brush|func_button_timed}} It is a button that takes time to use.


==Keyvalues==
== Keyvalues ==
{{KV|Use Time|integer|The amount of time player must hold down [[use]], in seconds.}}
{{KV|Use String|string|The text/string that appears on the progress bar while the player is holding down use. }}
{{KV|Use Sub-String|string|A sub-string that appears below the Use String. }}
{{KV|Glow Entity|target_destination|The name of an entity that will get the +use glow for this button.}}
{{KV|Auto-Disable On Time Up|boolean|When the use timer is up, disable the button. (Can be enabled with an input)}}
{{KV|Locked Sound|choices|Sound played when the player tries to use the button, and fails because it's locked.}}
:{| class=standard-table
! Value || Description
|-
| <code>0</code> || None
|-
| <code>2</code> || Access Denied
|-
| <code>8</code> || Small zap
|-
| <code>10</code> || Buzz
|-
| <code>11</code> || Buzz Off
|-
| <code>12</code> || Latch Locked
|}
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV Parentname}}
{{KV Origin}}
{{KV Origin}}
{{KV RenderFields}}
{{KV RenderFields}}
{{KV DistanceFade}}
{{KV DamageFilter}}
{{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==
== Flags ==
*1: Starts locked
* 2048 : Starts locked


==Inputs==
== Inputs ==
{{IO|Lock|Lock the button, preventing it from functioning and playing a locked sound.}}
{{IO|Unlock|Unlock the button, allowing it to function.}}
{{IO|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 Targetname}}
{{I Targetname}}
{{I Parentname}}
{{I Parentname}}
{{I RenderFields}}
{{I DamageFilter}}
{{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==
== Outputs ==
{{IO|OnPressed|Fired when the button is pressed.}}
{{IO|OnUnPressed|Fired when the button is unpressed.}}
{{IO|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 Targetname}}
{{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==
*[[func_button]]
==External links==

Revision as of 04:02, 12 August 2011

Template:L4d series brush It is a button that takes time to use.

Keyvalues

Use Time ([todo internal name (i)]) <integer>
The amount of time player must hold down use, in seconds.
Use String ([todo internal name (i)]) <string>
The text/string that appears on the progress bar while the player is holding down use.
Use Sub-String ([todo internal name (i)]) <string>
A sub-string that appears below the Use String.
Glow Entity ([todo internal name (i)]) <targetname>
The name of an entity that will get the +use glow for this button.
Auto-Disable On Time Up ([todo internal name (i)]) <boolean>
When the use timer is up, disable the button. (Can be enabled with an input)
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
0 None
2 Access Denied
8 Small zap
10 Buzz
11 Buzz Off
12 Latch Locked
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

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
  • 0: Normal
  • 1: Color
  • 2: Texture
  • 3: Glow
  • 4: Solid/Alphatest Obsolete
  • 5: Additive
  • 6: Removed, does nothing Obsolete
  • 7: Additive Fractional Frame
  • 8: Alpha Add
  • 9: World Space Glow
  • 10: Don't Render
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

  • 2048 : Starts locked

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.


Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/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 <stringRedirectInput/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 rendermode set to a number other than 0.
Color <color255RedirectInput/color32>
Sets an RGB color for the entity.

DamageFilter:

SetDamageFilter <stringRedirectInput/string>
Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.

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.