Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.
This article's documentation is for anything that uses the Source engine. Click here for more information.

func_weight_button

From Valve Developer Community
Jump to: navigation, search


English (en)
... Icon-Important.png
Info.png
This entity is not in the FGD by default , except in PortalPortal 2.
See below for instructions on making it available.
class hierarchy
CWeightButton defined in weight_button.cpp
CBaseEntity

func_weight_button is a brush entity available in all Source Source games. It is a 'Button' which activates after a specified amount of weight is touching it.

Keyvalues

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Amount of weight required before this button activates. (WeightToActivate) <float>
Amount of weight required before this button activates.

Outputs

OnPressed
Fired when the button is touching enough weight.
OnReleased
Fired when the button was pressed, but weight was removed.