CPropFloorButton

From Source Entities
Jump to navigation Jump to search
Prop floor button.png

CPropFloorButton is a code class for floor buttons in P2.pngPortal 2.

Classnames:

Keyvalues[edit | edit source]

Button model (model) <studio>
Model to use.

Inputs[edit | edit source]

PressIn
Presses the button regardless of its current state. Fires the OnPressed output and the appropriate Blue/Orange output if the activator is a player.
Bug: If sent while a valid entity is on the button, that entity will appear to be nudged upward even though the button doesn't move.
Bug: If sent while nothing is on the button, the OnPressed output will fire a second time when an entity actually presses the button.
PressOut
Unpresses the button regardless of its current state. Fires the OnUnPressed output.
Bug: Cubes may immediately re-press the button if they're on it when sent.
Bug: If sent while a valid entity is on the button, the OnUnPressed output will fire a second time when that entity actually moves off the button.

Outputs[edit | edit source]

OnPressed
Fires when the button is pressed.
OnPressedBlue
Fires when ATLAS stands on the button or they're the activator of the PressIn input. Does not fire when they place an object on the button.
OnPressedOrange
Fires when P-Body stands on the button or they're the activator of the PressIn input. Does not fire when they place an object on the button.
OnUnPressed
Fires when the button is no longer being pressed.