Prop button: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (-cleanup) | SirYodaJedi (talk | contribs)  mNo edit summary | ||
| Line 13: | Line 13: | ||
| :* 0 : Clean | :* 0 : Clean | ||
| :* 1 : Rusted | :* 1 : Rusted | ||
| {{KV|Solid|boolean|Makes the button non-solid to objects and the player. It can still be pressed like normal.|nofgd=1}}	 | {{KV|Solid|boolean|Makes the button non-solid to objects and the player. It can still be pressed like normal.|nofgd=1}} | ||
| {{expand|title=CBaseAnimating| | |||
| {{KV Studiomodel|no model=1|no sequence=1|}} | |||
| }} | |||
| ==Inputs== | ==Inputs== | ||
Revision as of 14:27, 20 August 2024
|  Class hierarchy | 
|---|
| CPropButton | 
|  portal2/prop_button.cpp | 
prop_button  is a   point entity  available in  Portal 2. 
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. For Old Aperture maps, use prop_under_button.
 Portal 2. 
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. For Old Aperture maps, use prop_under_button.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Delay Before Reset (Delay) <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? (istimer) <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? (preventfastreset) <boolean>
- Buttons that are timer's allow you to reset early - use this to make the button stick for the entire duration.
- Skin (skin) <choices>
- Affects the pillar skin. Same as a prop entity's Skin KV.
- 0 : Clean
- 1 : Rusted
 
- Solid ([todo internal name (i)]) <boolean> !FGD
- Makes the button non-solid to objects and the player. It can still be pressed like normal.
| 
 
 
 
 
 Shadow: 
 
 
 
 
 
 | 
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.
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.





