Buttons and Switches (Portal 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page.)
 
(Redirected page to Button (Portal 2))
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
There are various types of buttons and switches used in [[Portal 2]].  The process of creating them has been simplified greatly since the original Portal; whereas several models and triggers were needed for the original devices, only one entity is needed for each of the buttons and switches in the newer game.
#REDIRECT [[Button (Portal 2)]]
 
'''Tip:''' For organization, consider using logic_relays triggered by buttons/switches to interact with other portions of the map.  This is especially recommended when dealing with instances, as it may be necessary for the logic to function correctly.
 
Thanks to all those who helped write the original [[Buttons (Portal 2)]] page, as most of the content here is taken from or derived from there.
 
==Switches==
[[File:prop_button.png|thumb|100px|right|The pillar style button]]
===Newer Switch===
To create the newer Aperture Pedestal Switch in Hammer, place a [[prop_button]] entity  (yes, that's right--no func_buttons or anything).  You can use OnPressed and OnButtonReset for firing outputs when the button is pressed and when it resets; for coop mode there are also OnPressedBlue and OnPressedOrange outputs for when the switch is pressed by Atlas and P-Body respectively.  You can also choose between Clean (rebuilt facility) and Rusted (decrepit/overgrown) skins.  For more info see the entity's page.
 
[[File:Prop under button.png|thumb|right|100px|The Old Aperture pillar button]]
===Older Switch===
The procedure for creating the switch seen in the 1940s through 1980s Aperture Labs is very similar to the process for the Newer Switch; simply use a [[prop_under_button]] instead.  The entity has the same outputs and keyvalues.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
==Buttons==
[[Image:Super_button_p2_blue.jpg|thumb|right|100px|The Super button]]
===Newer Button===
To create the newer Aperture Science 1500 Megawatt Supercolliding Superbutton in Hammer, place a [[prop_floor_button]].  The button can be activated by the player or storage cubes, and has outputs similar to the switches: OnPressed, OnUnpressed, OnPressedBlue, and OnPressedOrange.  You can also find a button setup in the SDK's provided instances.
 
[[Image:Underground button.jpg|thumb|right|100px|The Old Aperture style button]]
===Older Button===
As with switches, construction of the 1940s through 1980s button is similar to that of the newer one; simply use a [[prop_under_floor_button]].  It has the same outputs '''except''' it is apparently missing the coop-player specific outputs.
 
[[File:prop_floor_cube_button.jpg|right|thumb|100px|The cube-specific floor button.]]
===Newer Cube-Specific Button===
Created by placing a [[prop_floor_cube_button]].  A version of the button that is square, mostly because it is activated by a [[prop_weighted_cube]].  Has the same outputs as the older button.  Outputs are the same as the older button
 
[[File:prop_floor_ball_button.jpg|right|thumb|100px|The sphere-specific floor button.]]
===Newer Sphere-Specific Button===
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.
 
[[Category:Portal 2 Level Design]]
[[Category:Portal 2 Tutorials]]

Latest revision as of 12:26, 5 November 2011

Redirect to: