Button (Portal 2)
Buttons are interactive objects in the Portal series. There are different kinds of buttons in Portal 2, which can be activated in different ways. The standard button can only be triggered by the player. A floor button can be activated by both the player and a cube, and cube buttons can only be toggled by cubes.
The tall, red capped, player activated button is very simple to create. It can be tied to a timer.
First, place a prop_button entity on the ground and position it where you want it. Direct the OnPressed output to a logic_relay or instance containing the actions that should occur when the button is pressed.
To have the button act as a timer, set the Delay Before Reset property to the desired amount of time and Play timer sound? to "Yes." Direct the OnButtonReset to the trigger you want to activate when time runs out.
prop_under_button functions in the same way, but has a different model, and is used in the underground sections of old Aperture.
Often but not necessarily positioned on the floor, it can be activated by both cubes and the player.
Select the entity creation tool and choose prop_floor_button from the list. Spawn it, an place it where you want on the map. By going into the properties of the button, you can choose what you want to happen when it is pressed (OnPressed) or when it is released (OnUnPressed). Under the 'Button model' property in the 'Class Info' tab you can change the way the floor button looks. Just filter "portal_button" in the model browse menu.
In order to create the base, as they appear in-game, simply add an instance with the 'base' .VMF. There are four different bases: destroyed\intact black, destroyed\intact white
Created by placing a prop_floor_ball_button. A version of the button that is round and smaller, mostly because it is activated by a prop_weighted_cube with CubeType set to Sphere. Outputs are the same as the older button.