Prop button: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Keyvalues: reorganized)
Line 4: Line 4:


==Keyvalues==
==Keyvalues==
{{KV Angles}}
{{KV|Delay Before Reset|float|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.}}
{{KV|Delay Before Reset|float|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.}}
{{KV|Play timer sound?|boolean|If set, this button will play timer sounds while button is depressed. This allows fast reset by default - use Prevent fast reset to stop this.}}
{{KV|Play timer sound?|boolean|If set, this button will play timer sounds while button is depressed. This allows fast reset by default - use Prevent fast reset to stop this.}}
Line 11: Line 10:
:* 0 : Clean
:* 0 : Clean
:* 1 : Rusted
:* 1 : Rusted
{{KV Angles}}
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV Parentname}}

Revision as of 22:14, 1 June 2012

The pillar style button

Template:Portal2 point It is a pillar style button. It acts the same as the func_button brush and is used as a player activated entity which triggers events in the game.

Keyvalues

Delay Before Reset ([todo internal name (i)]) <float>
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.
Play timer sound? ([todo internal name (i)]) <boolean>
If set, this button will play timer sounds while button is depressed. This allows fast reset by default - use Prevent fast reset to stop this.
Prevent fast reset? ([todo internal name (i)]) <boolean>
Buttons that are timer's allow you to reset early - use this to make the button stick for the entire duration.
Skin ([todo internal name (i)]) <choices>
Affects the pillar skin. Same as a prop entity's Skin KV.
  • 0 : Clean
  • 1 : Rusted
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
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.

Inputs

Press
Cause the button to be pressed.
Lock
Locks the button.
UnLock
UnLocks the button.
CancelPress
Causes the button to reset quietly and without firing OnButtonReset outputs.


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.

Outputs

OnPressed
Called when the button has been pressed.
OnPressedBlue
Called in Coop when the button has been pressed by the Blue player.
OnPressedOrange
Called in Coop when the button has been pressed by the Orange player.
OnButtonReset
Called when the button has reset after being pressed.


See also