Test Door (Portal 2): Difference between revisions
mNo edit summary |
Kestrelguy (talk | contribs) m (updated language bar. also some formatting.) |
||
Line 1: | Line 1: | ||
{{ | {{lang|Test Door (Portal 2)}} | ||
| | |||
}} | |||
{{stub}} | {{stub}} | ||
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. | 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. | ||
Line 10: | Line 7: | ||
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). | 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.}} | {{note|In Portal 2 co-op, test chamber doors are not used to separate puzzles. Instead airlocks are used.}} | ||
{{ent|prop_testchamber_door}} is the main entity that creates the door visuals, collisions and sounds. | |||
Its corresponding [[instance]] makes use of {{ent|func_areaportalwindow}}s, tweaks, and further exploit prevention mechanisms. | |||
To create a door, you will need to place a <code>prop_testchamber_door</code> 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 {{ent|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 <code>prop_dynamic</code>, have them add/subtract a value of one on activation/deactivation. | |||
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== | ==Manually Debugging Doors, Method 1== | ||
Line 23: | Line 19: | ||
Sometimes the player or an object can get stuck inside a door and not get killed. To fix this you'll need: | Sometimes the player or an object can get stuck inside a door and not get killed. To fix this you'll need: | ||
*One | *One {{ent|func_brush}} with the invisible (tools/toolsinvisible) texture applied to it | ||
*One | *One {{ent|trigger_hurt}} with the trigger (tools/toolstrigger) texture applied to it | ||
*One | *One {{ent|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. | 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: | On your <code>func_brush</code>, set these keyvalues and flags: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 45: | Line 41: | ||
|} | |} | ||
On your trigger_hurt, set these keyvalues: | On your <code>trigger_hurt</code>, set these keyvalues: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 60: | Line 56: | ||
|} | |} | ||
On your trigger_portal_cleanser, set these keyvalues: | On your <code>trigger_portal_cleanser</code>, set these keyvalues: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 69: | Line 65: | ||
|} | |} | ||
Now your ''prop_testchamber_door'' will need to use its outputs to control the above entities as follows: | Now your ''<code>prop_testchamber_door</code>'' will need to use its outputs to control the above entities as follows: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 88: | Line 84: | ||
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: | 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 | *One {{ent|func_brush}} with the invisible (<code>tools/toolsinvisible</code>) texture applied to it | ||
*Two | *Two {{ent|logic_branch}}es | ||
*One | *One {{ent|logic_branch_listener}} | ||
*One | *One {{ent|prop_testchamber_door}} | ||
*One | *One {{ent|trigger_multiple}} with the trigger (<code>tools/toolstrigger</code>) texture applied to it | ||
*One | *One {{ent|trigger_portal_cleanser}} with the trigger (<code>tools/toolstrigger</code>) texture applied to it | ||
The func_brush and trigger_portal_cleanser should be 128 units wide, 104 units high, and 8 units thick. | The <code>func_brush</code> and <code>trigger_portal_cleanser</code> should be 128 units wide, 104 units high, and 8 units thick. The <code>trigger_multiple</code> 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: | On your <code>func_brush</code>, set these keyvalues and flags: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 113: | Line 109: | ||
|} | |} | ||
On your first logic_branch, set these keyvalues: | On your first <code>logic_branch</code>, set these keyvalues: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 122: | Line 118: | ||
|} | |} | ||
On your second logic_branch, set these keyvalues: | On your second <code>logic_branch</code>, set these keyvalues: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 131: | Line 127: | ||
|} | |} | ||
On your logic_branch_listener, set these keyvalues and outputs: | On your <code>logic_branch_listener</code>, set these keyvalues and outputs: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 149: | Line 145: | ||
|} | |} | ||
On your prop_testchamber_door, set these keyvalues and outputs: | On your <code>prop_testchamber_door</code>, set these keyvalues and outputs: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 171: | Line 167: | ||
|} | |} | ||
On your trigger_multiple, set these keyvalues and outputs: | On your <code>trigger_multiple</code>, set these keyvalues and outputs: | ||
::{| class=standard-table | ::{| class=standard-table | ||
Line 189: | Line 185: | ||
|} | |} | ||
On your trigger_portal_cleanser, set these keyvalues: | On your <code>trigger_portal_cleanser</code>, set these keyvalues: | ||
::{| class=standard-table | ::{| class=standard-table |
Revision as of 19:39, 24 April 2022
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: