Кнопки (Portal 2)
Здесь показаны типы переключателей в Portal 2. На этой странице так же показано, как сделать их на своей карте.
Кнопка на подставке
Длинные, красные, они могут быть активированы игроком и в Portal 2 их очень просто сделать. Кнопка используется как переключатель для дверей и других entity в игре, так же, как и обычный таймер.
Создание
Сначала создайте prop_button entity на земле там, где вы хотите. Используйте OnPressed output для logic_relay или других вещей, которые должны произойти, если нажать кнопку.
Чтобы кнопка действовала как таймер установите параметр Delay Before Reset на нужное количество времени и Play timer sound? на "Yes." Используйте OnButtonReset для активации события, которое произойдет, когда время закончится.
prop_under_button имеет те же функции, но с другими звуками и моделью и использкуется в старых частях Aperture Science.
Супер кнопка
Обычная кнопка
1500-мегаваттная сверхпрочная сверхударная сверхкнопка. Используется в Portal 2, чтобы открывать двери, поднимать лестницы или переключать entity. Она может быть активирована кубом, игроком или другими предметами. Обычно кнопка сделана из одного только prop_floor_button, но в официальных картах обычно используется один из instance'ов кнопок.
Создание
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 diffrent bases: destroyed\intact black, destroyed\intact white
Кнопка для кубов
Делается установкой prop_floor_cube_button. Это кнопка активируется только с помощью prop_weighted_cube. Output'ы те же, что и у предыдущей кнопки.
Кнопка для сфер
Делается установкой prop_floor_ball_button. Это версия кнопки активируется только prop_weighted_cube с параметром CubeType установленным на Sphere. Output'ы одинаковы с предыдущими кнопками.
Кнопка из старой Aperture
This button, acts exactly as the Super Button does, the only difference is the appearance. It can be triggered by the player and cubes. For consistency this button is used only in the Old Aperture parts of official maps, and usually is activated by the 'antique cube'.
Создание
In the entity creation list find the prop_under_floor_button and spawn it in the desired place. As it acts like the normal Super Button, the outputs are the same, what happens when the button is pressed (OnPressed) and when it is released (OnUnpressed). Interestingly, even when the 'regular' cube is on the button, it will change its inner color to yellow - just as it would do on the newer Super Button ones.
Дорожка света
To create those lights that direct what you are activating when you press the button, here is how to make them:
Шаг 1: Select the texture "indicator_lights_wall" and apply overlays to make a light path.
Шаг 2: Name them all the same name (for me I am going to go with button_lights_01)
Шаг 3: Make a env_texturetoggle entity and place it next to your lights, name it light_change. Set the target brush(es) to button_lights_01 (or what you named the overlays of all the lights)
Шаг 4: With your button selected, hit alt+enter to bring up the properties, go to the output tab, and make an 2 outputs like this:
Вот и всё, теперь должно работать!