This article relates to the game "Team Fortress 2". Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.

TF2/Making an Arena map: Difference between revisions

From Valve Developer Community
< TF2
Jump to navigation Jump to search
m (Unicodifying, added underlinked tag)
 
(47 intermediate revisions by 22 users not shown)
Line 1: Line 1:
== The Arena gamemode ==
{{Underlinked|date=January 2024}}
This is a new gamemode that came along with the heavy update.
{{lang|TF2/Making an Arena map|title=Making an Arena Map}}{{tF2 topicon}}{{source topicon}}
In this gamemode, you don't respawn until your whole team is dead.
{{ABSGametypeLib}}
The goal is to kill everyone on the enemy team, or to capture the center control point of the map.
The control point is locked for 60 seconds in Valve's Arena maps, and cannot be captured until it's unlocked.


This tutorial will show you how to set up the Arena gamemode exactly as it is in arena_lumberyard.
{{tfwiki|Arena}} is a gamemode for {{tf2|4}} that came along with the {{tfwiki|Heavy Update}}. In this gamemode, you don't respawn until your team wins or loses. The goal is to kill everyone on the enemy team or capture the center control point of the map. The control point is locked for 60 seconds in Valve's Arena maps, and cannot be captured until it's unlocked.


For those of you who doesn't want to go through the tutorial; I've made a prefab with the entities and settings ready, get it [http://www.fileden.com/files/2008/5/7/1901107/gamemode_arena.vmf Here]
This article will tell you how to set up the Arena gamemode for your map.


Place it in this folder: $SteamUserDir\sourcesdk\bin\orangebox\bin\prefabs\
=Arena Gamemode Entities=
First, we'll need an entity to check when a team captures the center control point.


== Tutorial ==
*{{ent|team_control_point_master}}


'''1.''' Add the following entities:
::{| class=standard-table
!Property Name || Value 
|-
| Name || master_control_point
|-
|}


'''team_control_point_master'''
*{{ent|tf_logic_arena}}


Name: master_control_point
This entity will be used to send an output when a round starts and when the control point is enabled. Specify the amount of seconds you want before it's activated here. 60 is the default setting.


OnWonByTeam1 | counter_red_win | Add | 1
::{| class=standard-table
!  Property Name || Value
|-
| CapEnableDelay || 60
|-
|}


OnWonByTeam2 | counter_blu_win | Add | 1


Now add the following outputs to it:


'''math_counter'''
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[File:Io11.png]] || OnCapEnabled || cap_flag || ShowModel || <none> || 0.00 || No
|-
| [[File:Io11.png]] || OnArenaRoundStart || relay_round_start || Trigger || <none> || 0.00 || No
|-
| [[File:Io11.png]] || OnCapEnabled || relay_cap_enable || Trigger || <none> || 0.00 || No
|-
|}


Name: counter_red_win
The first output displays the model for the control point when it has been enabled. The other two triggers the relays for the round start and control point activation.


Maximum Legal Value: 3
*{{ent|logic_relay}}


OnHitMax | text_red_game_win | Display
This will be used for outputs when the round starts.


OnHitMax | end_game | EndGame | <none> | 6
::{| class=standard-table
!  Property Name || Value
|-
| Name || relay_round_start
|-
|}




'''math_counter'''
*{{ent|logic_relay}}


Name: counter_blu_win
This will be used for outputs when the control point is enabled.


Maximum Legal Value: 3
::{| class=standard-table
!  Property Name || Value
|-
| Name || relay_cap_enable
|-
|}


OnHitMax | text_blu_game_win | Display
That's about it for the basic gamemode.


OnHitMax | end_game | EndGame | <none> | 6
== Control point setup ==


Now we'll set up the center control point entities.


'''game_text'''
*{{ent|prop_dynamic}}


Name: text_red_game_win
This is the base model for the control point. It will be configured to change skin when a team captures it.
::{| class=standard-table
!  Property Name || Value
|-
| World Model || models/props_gameplay/cap_point_base.mdl
|-
| Name || prop_cap_1
|-
|}


Message Text: Red Wins the Game!
*{{ent|team_control_point}}


Color2: 240 0 6
This is the control point.
::{| class=standard-table
!  Property Name || Value
|-
| Name || cap_flag
|-
| Print Name || #Arena_cap
|-
| Index || 3
|-
| BLUE model bodygroup || 0
|-
|}


Check the "All players" flag.
*Check the "Start with model hidden" flag. This is because it will be displayed when the control point is enabled




'''game_text'''
*{{ent|trigger_capture_area}}


Name: text_blu_game_win
This is the trigger area, that will let the teams capture it after it's enabled.
You can modify these values to suit your map.


Message Text: Blue Wins the Game!
::{| class=standard-table
! Property Name || Value
|-
| Name || cap_trigger
|-
| Control point || cap_flag
|-
| Number of RED players to cap || 3
|-
| Number of BLUE players to cap || 3
|-
| Time to cap (sec) || 4
|-
|}


Color2: 0 0 240
::{| class=standard-table
 
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
Check the "All players" flag.
|-
 
| [[File:Io11.png]] || OnCapTeam1 || prop_cap_1 || Skin || 1 || 0.00 || No
 
|-
'''game_end'''
| [[File:Io11.png]] || OnCapTeam2 || prop_cap_1 || Skin || 2 || 0.00 || No
 
|-
Name: end_game
 
 
'''logic_auto'''
 
OnMapSpawn | tf_gamerules | SetStalemateOnTimelimit | 1 ''(This will appear as a broken Output)''
 
 
'''logic_relay'''
 
Name: relay_round_start
 
 
'''logic_relay'''
 
Name: relay_cap_enable
 
 
'''tf_logic_arena'''
 
CapEnableDelay: 60
 
''This entity does not exist in the tf.fgd file, so you'll have to enter the keyvalues yourself.''
 
 
 
'''2.''' Save your map, close it in hammer and open it in notepad.
 
'''3.''' Press ctrl+F and search for tf_logic_arena
 
'''4.''' Add this text above "origin":
 
''connections
 
{
 
"OnCapEnabled" "cap_flag,ShowModel,,0,-1"
 
"OnArenaRoundStart" "relay_round_start,Trigger,,0,-1"
 
"OnCapEnabled" "relay_cap_enable,Trigger,,0,-1"
 
}''
 
 
'''5.''' Save the vmf and close notepad.
 
'''6.''' Open the map in Hammer and add these control point entities:
 
 
'''prop_dynamic'''
 
World Model: models/props_gameplay/cap_point_base.mdl
 
Name: prop_cap_1
 
 
'''team_control_point'''
 
Name: cap_flag
 
Print Name: #Arena_cap
 
Index: 3
 
BLUE model bodygroup: 0
 
Check the "Start with model hidden" flag.
 
 
'''trigger_capture_area'''
 
Name: cap_trigger
 
Control point: cap_flag
 
Number of RED players to cap: 3
 
Number of BLUE players to cap: 3
 
Time to cap (sec): 4
 
OnCapTeam1 | prop_cap_1 | Skin | 1
 
OnCapTeam2 | prop_cap_1 | Skin | 2
 
OnEndCap | relay_resettimer | Trigger


|}




That's it!
That's it!
It should be working now. Don't forget to add a spawnroom if you want to try it out.
It should be working now. Don't forget to [https://developer.valvesoftware.com/wiki/Team_Fortress_2/Creating_a_Spawnroom| add a spawnroom] if you want to try it out. You might want to add a [[relay_round_start]] to trigger the spawndoors to open.
 
 
== Q & A ==
 
'''How do I make something happen when a round starts? Such as opening spawnroom doors.'''
 
''The logic_relay named relay_round_start will trigger when a round starts.''
 
 
'''How do I make something happen when the control point is activated?'''
 
''The logic_relay named relay_cap_enable will trigger when the control point is activated.''
 
 
'''How do I modify the time it takes before the control point is activated?'''
 
''In the tf_logic_arena entity, change the CapEnableDelay to the amount of seconds you want.''
 
 
'''How do I test my map? It's waiting for players all the time'''


''Write "bot" in the console and it'll add a player for you, allowing you to test the map''


Now, if you load your map, you will notice the server will keep you in the spawn area as it waits for more players to join. To fix this, open up the console and type <code>sv_cheats 1;bot</code>. This will add a bot to the server and let you playtest the map. You haven't made the bot do anything though. They will just stand in spawn and do nothing


Contact: Acegikmo_Trackmania@hotmail.com
== See also ==
* [[Team Fortress 2 Level Creation]]


--[[User:Acegikmo|Acegikmo]] 07:57, 20 Aug 2008 (PDT)
[[Category:Level Design]]
[[Category:Team Fortress 2|Making]]

Latest revision as of 18:29, 7 January 2024

Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
English (en)한국어 (ko)Русский (ru)Translate (Translate)

This gametype is included in A Boojum Snark's Team Fortress 2 Gametype Library

The complete entity setup for this gametype is included in "A Boojum Snark's Team Fortress 2 Gametype Library," a downloadable VMF that includes all official Team Fortress 2 gametypes. The entities can easily be transferred from the VMF to your own custom map without the hassle of having to build it yourself or debugging it.

"A Boojum Snark's Team Fortress 2 Gametype Library" can be downloaded here: TF2Maps.net

Tfwiki favicon.png Arena is a gamemode for Team Fortress 2 Team Fortress 2 that came along with the Tfwiki favicon.png Heavy Update. In this gamemode, you don't respawn until your team wins or loses. The goal is to kill everyone on the enemy team or capture the center control point of the map. The control point is locked for 60 seconds in Valve's Arena maps, and cannot be captured until it's unlocked.

This article will tell you how to set up the Arena gamemode for your map.

Arena Gamemode Entities

First, we'll need an entity to check when a team captures the center control point.

Property Name Value
Name master_control_point

This entity will be used to send an output when a round starts and when the control point is enabled. Specify the amount of seconds you want before it's activated here. 60 is the default setting.

Property Name Value
CapEnableDelay 60


Now add the following outputs to it:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnCapEnabled cap_flag ShowModel <none> 0.00 No
Io11.png OnArenaRoundStart relay_round_start Trigger <none> 0.00 No
Io11.png OnCapEnabled relay_cap_enable Trigger <none> 0.00 No

The first output displays the model for the control point when it has been enabled. The other two triggers the relays for the round start and control point activation.

This will be used for outputs when the round starts.

Property Name Value
Name relay_round_start


This will be used for outputs when the control point is enabled.

Property Name Value
Name relay_cap_enable

That's about it for the basic gamemode.

Control point setup

Now we'll set up the center control point entities.

This is the base model for the control point. It will be configured to change skin when a team captures it.

Property Name Value
World Model models/props_gameplay/cap_point_base.mdl
Name prop_cap_1

This is the control point.

Property Name Value
Name cap_flag
Print Name #Arena_cap
Index 3
BLUE model bodygroup 0
  • Check the "Start with model hidden" flag. This is because it will be displayed when the control point is enabled


This is the trigger area, that will let the teams capture it after it's enabled. You can modify these values to suit your map.

Property Name Value
Name cap_trigger
Control point cap_flag
Number of RED players to cap 3
Number of BLUE players to cap 3
Time to cap (sec) 4
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnCapTeam1 prop_cap_1 Skin 1 0.00 No
Io11.png OnCapTeam2 prop_cap_1 Skin 2 0.00 No


That's it! It should be working now. Don't forget to add a spawnroom if you want to try it out. You might want to add a relay_round_start to trigger the spawndoors to open.


Now, if you load your map, you will notice the server will keep you in the spawn area as it waits for more players to join. To fix this, open up the console and type sv_cheats 1;bot. This will add a bot to the server and let you playtest the map. You haven't made the bot do anything though. They will just stand in spawn and do nothing

See also