Coop Door (Portal 2): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Finished Co-op door tut.)
Line 103: Line 103:
2.)
2.)
Create a <code>32Lx4Wx32H</code> [[func_brush]] with the texture:
Create a <code>32Lx4Wx32H</code> [[func_brush]] with the texture:
[[signage/coop/teamdoor/orange]]
[[signage/coop/teamdoor|signage/coop/teamdoor/orange]]
::{| class=standard-table
!  Property Name || Value
|-
| Name || checkbox_o
|}
 
Align it to the left, inside the frame.
Align it to the left, inside the frame.
3.)
3.)
Repeat step 2 but change the following:
Repeat step 2 but change the following:
[[signage/coop/teamdoor/blue]]
[[signage/coop/teamdoor|signage/coop/teamdoor/blue]]
 
 
Align it to the right, inside the frame.
Align it to the right, inside the frame.




UNDER CONSTRUCTION (<code>Adding now</code>)
4.)
Add two [[env_texturetoggle]] with the following settings:
::{| class=standard-table
!  Property Name || Value
|-
| Name || textog_o
|-
| Target Brush(es). || checkbox_o
|}
::{| class=standard-table
!  Property Name || Value
|-
| Name || textog_b
|-
| Target Brush(es). || checkbox_b
|}
 
5.)
Add two [[ambient_generic]] with the following settings:
::{| class=standard-table
!  Property Name || Value
|-
| Name || sound_out
|-
| Sound Name || portal.button_down
|}
 
::{| class=standard-table
!  Property Name || Value
|-
| Name || sound_in
|-
| Sound Name || portal.button_up
|}
 
 
6.)
Add the following outputs to <code>relay_o_in</code>:
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnTrigger || textog_o || SetTextureIndex || 1 || 0.00 || No
|-
| [[Image:Io11.png]] || OnTrigger || sound_in || PlaySound || <none> || 0.00 || No
|}
 
Add the following outputs to <code>relay_o_out</code>:
 
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnTrigger || textog_o || SetTextureIndex || 0 || 0.00 || No
|-
| [[Image:Io11.png]] || OnTrigger || sound_out || PlaySound || <none> || 0.00 || No
|}


Add the following outputs to <code>relay_b_in</code>:
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnTrigger || textog_b || SetTextureIndex || 1 || 0.00 || No
|-
| [[Image:Io11.png]] || OnTrigger || sound_in || PlaySound || <none> || 0.00 || N
|}


Add the following outputs to <code>relay_b_out</code>:


::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnTrigger || textog_b || SetTextureIndex || 0 || 0.00 || No
|-
| [[Image:Io11.png]] || OnTrigger || sound_out || PlaySound || <none> || 0.00 || No
|}


To detect the bots, use a [[trigger_playerteam]] with the outputs OnStartTouchBlue, OnStartTouchOrange, OnEndTouchBlue and OnEndTouchOrange.
You have now created a door witch will open if both co-op partners are in the [[trigger|triggers]]
To make the signs that are above the door, use [[signage/coop/teamdoor]] textures on func_brushes with an env_texturetoggle to change from an X to a Check.


[[Category:Portal 2 Level Design]]
[[Category:Portal 2 Level Design]]
[[Category:Portal 2 Tutorials]]
[[Category:Portal 2 Tutorials]]

Revision as of 10:33, 12 May 2011

Co-Op doors consist of two triggers that both bots step on to open the door and for each trigger a person sign lights up.

Creation

Step one

1.) Add a prop_testchamber_door. With the following settings:

Property Name Value
Name door_01

2.) Add a logic_coop_manager with the following settings:

Property Name Value
Name coop_man

and outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnChangeToAllTrue door_01 Open <none> 0.00 No


Triggers

1.) Add a Logic_relay with the following Settings:

Property Name Value
Name relay_b_in

and outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger coop_man SetStateATrue <none> 0.00 No

2.) Add a Logic_relay with the following Settings:

Property Name Value
Name relay_b_out

and outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger coop_man SetStateAFalse <none> 0.00 No

3.) Repeat steps 1-2 but change the following:

Property Name Value
Name relay_o_in

outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger coop_man SetStateBTrue <none> 0.00 No

Add a Logic_relay with the following Settings:

Property Name Value
Name relay_o_out

outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger coop_man SetStateBFalse <none> 0.00 No

4.) Create a block brush with trigger texture applied. Tie this brush to a trigger_playerteam with the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouchBluePlayer relay_b_in Trigger <none> 0.00 No
Io11.png OnEndTouchBluePlayer relay_b_out Trigger <none> 0.00 No
Io11.png OnStartTouchOrangePlayer relay_o_in Trigger <none> 0.00 No
Io11.png OnEndTouchOrangePlayer relay_o_out Trigger <none> 0.00 No

Check Boxes

1.) Add a Prop_static with the following settings:

Property Name Value
World Model models/props/sign_frame02/sign_frame02.mdl

2.) Create a 32Lx4Wx32H func_brush with the texture: signage/coop/teamdoor/orange

Property Name Value
Name checkbox_o

Align it to the left, inside the frame.

3.) Repeat step 2 but change the following: signage/coop/teamdoor/blue


Align it to the right, inside the frame.


4.) Add two env_texturetoggle with the following settings:

Property Name Value
Name textog_o
Target Brush(es). checkbox_o
Property Name Value
Name textog_b
Target Brush(es). checkbox_b

5.) Add two ambient_generic with the following settings:

Property Name Value
Name sound_out
Sound Name portal.button_down
Property Name Value
Name sound_in
Sound Name portal.button_up


6.) Add the following outputs to relay_o_in:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger textog_o SetTextureIndex 1 0.00 No
Io11.png OnTrigger sound_in PlaySound <none> 0.00 No

Add the following outputs to relay_o_out:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger textog_o SetTextureIndex 0 0.00 No
Io11.png OnTrigger sound_out PlaySound <none> 0.00 No

Add the following outputs to relay_b_in:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger textog_b SetTextureIndex 1 0.00 No
Io11.png OnTrigger sound_in PlaySound <none> 0.00 N

Add the following outputs to relay_b_out:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger textog_b SetTextureIndex 0 0.00 No
Io11.png OnTrigger sound_out PlaySound <none> 0.00 No

You have now created a door witch will open if both co-op partners are in the triggers