Ko/TF2/Team-Specific Doors: Difference between revisions

From Valve Developer Community
< Ko‎ | TF2
Jump to navigation Jump to search
(Created page with "func_respawnroomvisualizer 엔티티는 리스폰 지점으로부터 스폰지점에 있는 사람들을 죽이는 플레이어들을 쫓아 내는데 사용되는 팀 전용...")
 
No edit summary
Line 1: Line 1:
[[func_respawnroomvisualizer]] 엔티티는 리스폰 지점으로부터 스폰지점에 있는 사람들을 죽이는 플레이어들을 쫓아 내는데 사용되는 팀 전용 보호막을 만듭니다, 하지만 당신은 한팀에게 당신이 원하는 어딘가에 접근을 제한하는데 사용할수도 있습니다. 이 방어막은 보통 같은 팀에게는 보이지 않고, 적팀에게는 보입니다.  이것은 적팀의 움직임과 폭발물들 둘다 제한할 것입니다.
Team-Specific Doors only open for one team, and are often placed in front of a respawn or in certain base areas on control point maps.


==강좌 - 리스폰 지점 방어막==
==Tutorial - Basic Team-Specific Doors==
[[image:TeamSpecificBarrier.jpg|thumb|right|200px|func_respawnroomvisualizer가 리스폰 지점 출입구에 있는 모습.]]
팀-전용 보호막들은 [[func_respawnroomvisualizer]] 와 [[Entity_Creation#Brush-based_entity_creation|brush-based entity]]와 그리고 어느 팀에게 허용할지를 알려주는 [[func_respawnroom]]로 만들어집니다. 


이 강좌에서는, 우리는 블루 팀 플레이어들을 쫓아낼 레드 팀을 위한 팀-전용 방어막을 만들어 볼겁니다. 당신은 func_respawnroom이 당신의 맵어딘가에 Team은 Red로 되어있는지 고유한 이름은 설정되어 있는지 계속 진행하기전에 확인해주시기 바랍니다.
For our example, we will be making a door to the red spawn area that will open only for the red team.


첫째로, create a [[func_respawnroomvisualizer]] [[Entity_Creation#Brush-based_entity_creation|brush-based entity]] with the material <tt>tools/toolsnodraw</tt> in the doorway of the spawn area.  This will be the barrier itself.  Set its Associated Respawn Room property to the name of your red team's func_respawnroom.  The example map uses red_spawn.
===The filter_activator_tfteam===


Next, using the texture application tool (Shift+A), select the face of the func_respawnroomvisualizer brush that faces away from your respawn roomSet it's material to <tt>overlays/no_entry</tt>You may also want to align it to "fit" to center it on the brush.
First, place a [[filter_activator_tfteam]] entity.  This is the filter that will determine which team can open the doorYou will need to set its Team, Filter mode, and Name as appropriateFor our example, we will set Team to Red, Filter mode to "Allow entities that match criteria", and the Name to red_filter.


You should now have a barrier that will stop the Blue team, but not the Red team!
You should only need one [[filter_activator_tfteam]] per team on your map.  All of your team-specific triggers can reference one of these two entities.  It might be a good idea to place these entities in some easy to remember location.  For our example, we will place our red_filter in our red team's spawn area.


Download the demo map here: [http://www.mediafire.com/?xyszmm9xwdd Download Here] {{clr}}
===The prop_dynamic===
 
[[File:TeamSpecificDoor-prop_dynamic.jpg|thumb|right|200px|The prop_dynamic.]]
 
Next, place a [[prop_dynamic]] and set its World Model to a nice door.  We'll use models/props_gameplay/door_slide_large_door.mdl for our example.  Do not forget to set the "parent" field to match the name of the [[func_door]], otherwise the prop will remain stationary when the trigger is activated. {{clr}}
 
===The func_door===
 
[[File:TeamSpecificDoor-func_door.jpg|thumb|right|200px|The func_door.]]
 
The second part of the door is a [[func_door]] [[Entity_Creation#Brush-based_entity_creation|brush-based entity]] that will determine how the door moves.  As this entity will be only a moving scheme for the prop, use the material tools/toolsnodraw.  The func_door will act as an invisible barrier to any player who runs into it, so the best thing to do is shape the brush close to the size of the model door, and overlap the two.
 
You will need to set a number of the [[func_door]]'s properties:
::{| class=standard-table
!  Property Name || Description || Value
|-
| Name || This should be something appropriate, such as door_red_spawn_01 for our example. || door_red_spawn_01
|-
| Speed || Changing this will effect how fast the door will open and close. Usually, this is set to 400 or 500 for a door that you don't have to wait for. ||
|-
| Move direction || This determines which direction the door moves when it opens.  Our example door will open Up, which can be chosen from the pull-down menu (this has been updated, there are now xyz numbers instead of a pulldown). || Up (-90 0 0)
|-
| Lip || This determines how much of the door, in Hammer units, sticks out when it is fully open.  For our example, we will use a value of 3. || 3
|-
| Delay Before Reset || Set this to -1 so that the door will never close as long as someone is in the doorway.  Otherwise, the door will close and NOT reopen until everyone has cleared the trigger.  Anything other that -1 can lead to griefing (i.e. one player can lock an entire team in the spawnroom).  || -1
|}
 
Next, go to the Flags tab in the [[func_door]]'s properties, and make sure Touch Opens is UNCHECKED.  If this were checked, it would allow the other team to bypass our filter by touching the door! Also, check the Toggle flag.
 
Now we need to give our [[func_door]] control of the door model.  Select the [[prop_dynamic]] door model, and set its Parent property to the name of our [[func_door]].  In this case, that's door_red_spawn_01.{{clr}}
 
===The trigger_multiple===
[[image:TeamSpecificDoor-Trigger_Multiple.jpg|thumb|right|200px|The trigger_multiple.]]
The third and final component of the door is a [[trigger_multiple]] brush-based entity that will tell the door to open when a player touches the trigger, and then to close.
 
The trigger should be large enough to handle players approaching from odd angles, and to ensure that the door opens before the player reaches it. You will usually want to stretch the trigger volume so that it can be activated from either side of the door, rather than making two trigger volumes.  It should use the tools/toolstrigger material.
 
Make sure to set "Delay Before Reset" to 0.  As default it is set to -1, meaning the door will never close once opened.
 
Select the Outputs tab in the [[trigger_multiple]]'s properties window.  You will need to add two outputs, which look like this:
 
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnEndTouchAll || door_red_spawn_01 || Close || <none> || 0.00 || No
|-
| [[Image:Io11.png]] || OnStartTouchAll || door_red_spawn_01 || Open || <none> || 0.00 || No
|}
 
Finally, the [[trigger_multiple]]'s Filter Name property should be set to your [[filter_activator_tfteam]]'s name to make the door team-specific.  In our case, that's red_filter.
 
That's it, we now have a door that will only open for the Red team!
 
[https://dl.dropbox.com/u/12664902/onlinesdk/hammer/team_specific_doors.zip Download the demo map here]{{clr}}


== Design Theory ==
== Design Theory ==
===Placement===
In theory, team-specific doors can be placed anywhere, but be very careful as they can greatly alter the balance of a map.


=== Materials ===  
===Collision===
You can assign a visible material to one or more sides of the [[func_respawnroomvisualizer]] brush to make it visible to the enemy teamUsually, the overlay/no_entry material is used.  You may be able to achieve other effects by using various materialsNot all materials will fade over distance like overlay/no_entry does, resulting in a solid wall that only exists for one team!
Doors on the official maps have their [[prop_dynamic]]'s Collisions property set to Not SolidThis is not required, but may be more efficientIn this case, the door's [[func_door]] brush will determine its collision, which is usually accurate enough.


===Buildings===
It may be necessary to add a [[func_nobuild]] [[Entity_Creation#Brush-based_entity_creation|brush-based entity]] in the doorway as well. This prevents engineers placing any buildings like sentries and dispensers in the doorway, which can cause various problems: It would look unrealistic when the door closes on the building, and it would prevent the door closing if you do not have the "Force-closed" property set to "yes". (However that property should always be set to "No" to prevent trapping the player within the door model.)


== See Also.. ==
== See Also.. ==
*[[TF2/Team-Specific Doors|Team-Specific Doors]]
* [[TF2/Team-Specific Barriers|Team-Specific Barriers]]
*[[TF2/Respawn_Areas|Respawn Areas]]
* [[TF2/Setup Gates|Setup Gates]]
* [[TF2/Respawn Areas|Respawn Areas]]
* [[Team Fortress 2 Level Creation]]
* [[Team Fortress 2 Level Creation]]


[[Category:Level Design Tutorials]]
[[Category:Level Design Tutorials]]
[[Category:Team Fortress 2]]
[[Category:Team Fortress 2]]

Revision as of 07:12, 2 December 2013

Team-Specific Doors only open for one team, and are often placed in front of a respawn or in certain base areas on control point maps.

Tutorial - Basic Team-Specific Doors

For our example, we will be making a door to the red spawn area that will open only for the red team.

The filter_activator_tfteam

First, place a filter_activator_tfteam entity. This is the filter that will determine which team can open the door. You will need to set its Team, Filter mode, and Name as appropriate. For our example, we will set Team to Red, Filter mode to "Allow entities that match criteria", and the Name to red_filter.

You should only need one filter_activator_tfteam per team on your map. All of your team-specific triggers can reference one of these two entities. It might be a good idea to place these entities in some easy to remember location. For our example, we will place our red_filter in our red team's spawn area.

The prop_dynamic

The prop_dynamic.

Next, place a prop_dynamic and set its World Model to a nice door. We'll use models/props_gameplay/door_slide_large_door.mdl for our example. Do not forget to set the "parent" field to match the name of the func_door, otherwise the prop will remain stationary when the trigger is activated.

The func_door

The func_door.

The second part of the door is a func_door brush-based entity that will determine how the door moves. As this entity will be only a moving scheme for the prop, use the material tools/toolsnodraw. The func_door will act as an invisible barrier to any player who runs into it, so the best thing to do is shape the brush close to the size of the model door, and overlap the two.

You will need to set a number of the func_door's properties:

Property Name Description Value
Name This should be something appropriate, such as door_red_spawn_01 for our example. door_red_spawn_01
Speed Changing this will effect how fast the door will open and close. Usually, this is set to 400 or 500 for a door that you don't have to wait for.
Move direction This determines which direction the door moves when it opens. Our example door will open Up, which can be chosen from the pull-down menu (this has been updated, there are now xyz numbers instead of a pulldown). Up (-90 0 0)
Lip This determines how much of the door, in Hammer units, sticks out when it is fully open. For our example, we will use a value of 3. 3
Delay Before Reset Set this to -1 so that the door will never close as long as someone is in the doorway. Otherwise, the door will close and NOT reopen until everyone has cleared the trigger. Anything other that -1 can lead to griefing (i.e. one player can lock an entire team in the spawnroom). -1

Next, go to the Flags tab in the func_door's properties, and make sure Touch Opens is UNCHECKED. If this were checked, it would allow the other team to bypass our filter by touching the door! Also, check the Toggle flag.

Now we need to give our func_door control of the door model. Select the prop_dynamic door model, and set its Parent property to the name of our func_door. In this case, that's door_red_spawn_01.

The trigger_multiple

The trigger_multiple.

The third and final component of the door is a trigger_multiple brush-based entity that will tell the door to open when a player touches the trigger, and then to close.

The trigger should be large enough to handle players approaching from odd angles, and to ensure that the door opens before the player reaches it. You will usually want to stretch the trigger volume so that it can be activated from either side of the door, rather than making two trigger volumes. It should use the tools/toolstrigger material.

Make sure to set "Delay Before Reset" to 0. As default it is set to -1, meaning the door will never close once opened.

Select the Outputs tab in the trigger_multiple's properties window. You will need to add two outputs, which look like this:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnEndTouchAll door_red_spawn_01 Close <none> 0.00 No
Io11.png OnStartTouchAll door_red_spawn_01 Open <none> 0.00 No

Finally, the trigger_multiple's Filter Name property should be set to your filter_activator_tfteam's name to make the door team-specific. In our case, that's red_filter.

That's it, we now have a door that will only open for the Red team!

Download the demo map here

Design Theory

Placement

In theory, team-specific doors can be placed anywhere, but be very careful as they can greatly alter the balance of a map.

Collision

Doors on the official maps have their prop_dynamic's Collisions property set to Not Solid. This is not required, but may be more efficient. In this case, the door's func_door brush will determine its collision, which is usually accurate enough.

Buildings

It may be necessary to add a func_nobuild brush-based entity in the doorway as well. This prevents engineers placing any buildings like sentries and dispensers in the doorway, which can cause various problems: It would look unrealistic when the door closes on the building, and it would prevent the door closing if you do not have the "Force-closed" property set to "yes". (However that property should always be set to "No" to prevent trapping the player within the door model.)

See Also..