Difference between revisions of "Test Door (Portal 2)"
Rockoman100 (talk | contribs) |
(Added directions on how to trigger prop_dynamics such as a Underground Enrichment Sphere door with multiple inputs. Needs formatting.) |
||
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{otherlang2 | ||
+ | |ru=Test Door (Portal 2):ru | ||
+ | }} | ||
{{stub}} | {{stub}} | ||
− | A '''Test Door''' corresponds to the double round doors found in the regular testing | + | A '''Test Chamber Door''' corresponds to the double round doors found in the regular testing courses. One of the sides displays Portal 2's ''Exit'' symbol. |
[[File:Test_door1.png|200px|thumb|right|Test Door]] | [[File:Test_door1.png|200px|thumb|right|Test Door]] | ||
− | In the official levels | + | In the official levels, this type of door is used specifically in test chambers to show the beginning and the end of the test chamber, in order to separate unrelated puzzles (as opposed to Portal where the same type of door can be found in the middle of the course as an integral puzzle element). |
+ | {{note|In Portal 2 co-op, test chamber doors are not used to separate puzzles. Instead airlocks are used.}} | ||
[[prop_testchamber_door]] is the main entity that creates the door visuals, collisions and sounds. | [[prop_testchamber_door]] is the main entity that creates the door visuals, collisions and sounds. | ||
− | Its corresponding [[instance]] makes use of [[ | + | Its corresponding [[instance]] makes use of [[func_areaportalwindow|func_areaportalwindows]], tweaks and further exploit prevention mechanisms. |
− | + | To create a door, you will need to place a [[prop_testchamber_door]] and an entity that can activate it. You will need to set the Inputs and Outputs to open the door when activated, and close the door when deactivated. | |
− | |||
− | + | If using a prop_dynamic, use logic flags such as SetAnimation to open it. If you want multiple inputs before it opens, have a math_counter entity with the '''MaxLegalValue''' field set to the number of connections. In this math counter, set its outputs to '''OnHitMax''' (prop_dynamic name) '''SetAnimation''' (animation name), and '''OnChangedFromMax''' (prop_dynamic name) SetAnimation (animation). | |
+ | In each entity that should trigger the prop_dynamic, have them add/subtract a value of one on activation/deactivation. | ||
− | + | ==Manually Debugging Doors, Method 1== | |
− | + | Sometimes the player or an object can get stuck inside a door and not get killed. To fix this you'll need: | |
− | + | *One [[func_brush]] with the invisible (tools/toolsinvisible) texture applied to it | |
+ | *One [[trigger_hurt]] with the trigger (tools/toolstrigger) texture applied to it | ||
+ | *One [[trigger_portal_cleanser]] with the trigger (tools/toolstrigger) texture applied to it | ||
− | + | Each of these should be 128 units wide, 104 units high, and 8 units thick; they should all be centered in the door. | |
− | + | On your func_brush, set these keyvalues and flags: | |
− | + | ||
− | + | ::{| class=standard-table | |
− | + | |- | |
− | + | ! Property Name !! Value | |
+ | |- | ||
+ | | Name || door_blocker | ||
+ | |} | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Flags !! Value | ||
+ | |- | ||
+ | | Physics Objects || Yes | ||
+ | |} | ||
+ | |||
+ | On your trigger_hurt, set these keyvalues: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || stuck_in_door_killer | ||
+ | |- | ||
+ | | Damage || 1000 | ||
+ | |- | ||
+ | | Damage Cap || 1000 | ||
+ | |- | ||
+ | | Damage Type || CRUSH | ||
+ | |} | ||
+ | |||
+ | On your trigger_portal_cleanser, set these keyvalues: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || stuck_in_door_killer | ||
+ | |} | ||
+ | |||
+ | Now your ''prop_testchamber_door'' will need to use its outputs to control the above entities as follows: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! !! My Output !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnClose || door_blocker || Enable || || 0.25 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnClose || stuck_in_door_killer || Enable || || 0.00 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnOpen || door_blocker || Disable || || 0.00 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnOpen || stuck_in_door_killer || Disable || || 0.00 || No | ||
+ | |} | ||
+ | |||
+ | ==Manually Debugging Doors, Method 2== | ||
+ | |||
+ | This method is a little more complicated to set up, but it is also more humane in that it does not kill test subjects nor test objects. It may also open up unintended solutions in your puzzles, so be wary of using this method. To use this method, you'll need: | ||
+ | |||
+ | *One [[func_brush]] with the invisible (tools/toolsinvisible) texture applied to it | ||
+ | *Two [[logic_branch|logic_branches]] | ||
+ | *One [[logic_branch_listener]] | ||
+ | *One [[prop_testchamber_door]] | ||
+ | *One [[trigger_multiple]] with the trigger (tools/toolstrigger) texture applied to it | ||
+ | *One [[trigger_portal_cleanser]] with the trigger (tools/toolstrigger) texture applied to it | ||
+ | |||
+ | The func_brush and trigger_portal_cleanser should be 128 units wide, 104 units high, and 8 units thick. The trigger_multiple should be 128 units wide, 104 units high, and 16 units thick. All of these brush entities should be centered in the door. | ||
+ | |||
+ | On your func_brush, set these keyvalues and flags: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || door_blocker | ||
+ | |} | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Flags !! Value | ||
+ | |- | ||
+ | | Physics Objects || Yes | ||
+ | |} | ||
+ | |||
+ | On your first logic_branch, set these keyvalues: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || player_in_door_branch | ||
+ | |} | ||
+ | |||
+ | On your second logic_branch, set these keyvalues: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || door_wants_to_close_branch | ||
+ | |} | ||
+ | |||
+ | On your logic_branch_listener, set these keyvalues and outputs: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Logic Branch 01 || player_in_door_branch | ||
+ | |- | ||
+ | | Logic Branch 02 || door_wants_to_close_branch | ||
+ | |} | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! !! My Output !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnAllFalse || test_chamber_door || Close || || 0.00 || No | ||
+ | |} | ||
+ | |||
+ | On your prop_testchamber_door, set these keyvalues and outputs: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || test_chamber_door | ||
+ | |} | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! !! My Output !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnClose || door_blocker || Enable || || 0.25 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnClose || stuck_in_door_fizzler || Enable || || 0.00 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnOpen || door_blocker || Disable || || 0.00 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnOpen || stuck_in_door_fizzler || Disable || || 0.00 || No | ||
+ | |} | ||
+ | |||
+ | On your trigger_multiple, set these keyvalues and outputs: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || player_in_door_trigger | ||
+ | |} | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! !! My Output !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnStartTouch || player_in_door_branch || ToggleTest || || 0.00 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnEndTouchAll || player_in_door_branch || ToggleTest || || 0.00 || No | ||
+ | |} | ||
+ | |||
+ | On your trigger_portal_cleanser, set these keyvalues: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! Property Name !! Value | ||
+ | |- | ||
+ | | Name || stuck_in_door_fizzler | ||
+ | |} | ||
+ | |||
+ | To use all of this with a floor button for example, you'll need to use these outputs: | ||
+ | |||
+ | ::{| class=standard-table | ||
+ | |- | ||
+ | ! !! My Output !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnPressed || test_chamber_door || Open || || 0.00 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnPressed || door_wants_to_close_branch || ToggleTest || || 0.00 || No | ||
+ | |- | ||
+ | | [[Image:Io11.png]] || OnUnPressed || door_wants_to_close_branch || ToggleTest || || 0.00 || No | ||
+ | |} | ||
[[Category:Portal 2 Level Design]] | [[Category:Portal 2 Level Design]] | ||
[[Category:Portal 2 Tutorials]] | [[Category:Portal 2 Tutorials]] |
Latest revision as of 20:32, 21 October 2016
This article is a stub. You can help by adding to it. |
A Test Chamber Door corresponds to the double round doors found in the regular testing courses. One of the sides displays Portal 2's Exit symbol.
In the official levels, this type of door is used specifically in test chambers to show the beginning and the end of the test chamber, in order to separate unrelated puzzles (as opposed to Portal where the same type of door can be found in the middle of the course as an integral puzzle element).

prop_testchamber_door is the main entity that creates the door visuals, collisions and sounds. Its corresponding instance makes use of func_areaportalwindows, tweaks and further exploit prevention mechanisms.
To create a door, you will need to place a prop_testchamber_door and an entity that can activate it. You will need to set the Inputs and Outputs to open the door when activated, and close the door when deactivated.
If using a prop_dynamic, use logic flags such as SetAnimation to open it. If you want multiple inputs before it opens, have a math_counter entity with the MaxLegalValue field set to the number of connections. In this math counter, set its outputs to OnHitMax (prop_dynamic name) SetAnimation (animation name), and OnChangedFromMax (prop_dynamic name) SetAnimation (animation). In each entity that should trigger the prop_dynamic, have them add/subtract a value of one on activation/deactivation.
Manually Debugging Doors, Method 1
Sometimes the player or an object can get stuck inside a door and not get killed. To fix this you'll need:
- One func_brush with the invisible (tools/toolsinvisible) texture applied to it
- One trigger_hurt with the trigger (tools/toolstrigger) texture applied to it
- One trigger_portal_cleanser with the trigger (tools/toolstrigger) texture applied to it
Each of these should be 128 units wide, 104 units high, and 8 units thick; they should all be centered in the door.
On your func_brush, set these keyvalues and flags:
Property Name Value Name door_blocker
Flags Value Physics Objects Yes
On your trigger_hurt, set these keyvalues:
Property Name Value Name stuck_in_door_killer Damage 1000 Damage Cap 1000 Damage Type CRUSH
On your trigger_portal_cleanser, set these keyvalues:
Property Name Value Name stuck_in_door_killer
Now your prop_testchamber_door will need to use its outputs to control the above entities as follows:
Manually Debugging Doors, Method 2
This method is a little more complicated to set up, but it is also more humane in that it does not kill test subjects nor test objects. It may also open up unintended solutions in your puzzles, so be wary of using this method. To use this method, you'll need:
- One func_brush with the invisible (tools/toolsinvisible) texture applied to it
- Two logic_branches
- One logic_branch_listener
- One prop_testchamber_door
- One trigger_multiple with the trigger (tools/toolstrigger) texture applied to it
- One trigger_portal_cleanser with the trigger (tools/toolstrigger) texture applied to it
The func_brush and trigger_portal_cleanser should be 128 units wide, 104 units high, and 8 units thick. The trigger_multiple should be 128 units wide, 104 units high, and 16 units thick. All of these brush entities should be centered in the door.
On your func_brush, set these keyvalues and flags:
Property Name Value Name door_blocker
Flags Value Physics Objects Yes
On your first logic_branch, set these keyvalues:
Property Name Value Name player_in_door_branch
On your second logic_branch, set these keyvalues:
Property Name Value Name door_wants_to_close_branch
On your logic_branch_listener, set these keyvalues and outputs:
Property Name Value Logic Branch 01 player_in_door_branch Logic Branch 02 door_wants_to_close_branch
On your prop_testchamber_door, set these keyvalues and outputs:
Property Name Value Name test_chamber_door
On your trigger_multiple, set these keyvalues and outputs:
Property Name Value Name player_in_door_trigger
On your trigger_portal_cleanser, set these keyvalues:
Property Name Value Name stuck_in_door_fizzler
To use all of this with a floor button for example, you'll need to use these outputs: