Team score with brushes
Overview
This tutorial will show you how to activate the team score in a HL2DM (Half-life 2 Deathmatch) using only brushes, which will allow you to create games like football, CTF, or other games that use a phys object to trigger team score.
**This tutorial assumes you have already created a map and spawns**
Step 1 ~ Create your trigger object
First create the object you want to trigger the team score with; this will most likely be a ball or some kind of flag for CTF. This can be done by creating a brush in the shape you want (sphere for a ball) and clicking the To Entity button on the right hand tool panel in hammer. When the shape is turned into an entity the default setting is usually a func_detail, but this can be changed to whatever entity type you need for the game you are making though for this tutorial we will make it into a func_physbox.
Name your object something meaningful so you can easily recognise it later from the list, for this example call the ball game_ball in the name setting.
Step 2 ~ Setup your goal area
Once you have your trigger object/s you must make the area that causes the team score to be advanced/decreased (cap area, goal ect ect) when the trigger object touches it. To do this you must select the trigger texture (use tools in filter to find trigger) and make a box that covers your goal/cap area completely. For example if you had a goal you would make the box inside the goal area so it completely fills the inside of the goal.
Turn the box you have just made into an entity (as above) and then make that box into a trigger_multiple using the pulldown. Name this box so you can recognise it easily, for example my goal will be called game_goal.
Create more goals/caps in the same way if you need to; just remember to name them differently.
Step 3 ~ Make a score entity
Next thing you need to do is to setup the game score that the teams will use. To do this you must first create a game_score entity which should be placed in plain view so you can find it easily, this could be outside your map as game_score does not have any in-game model or collision.
Input the score you want to give for a succesful goal/cap, though we will set the score to set as 5 for this tutorial.
Name your game_score entity something; we will call it score_add.
Now tick the Team Score tab in the properties of the game_score to enable the team to be given the score not the player.
Step 4 ~ Make the team filters
We now need something to tell the two teams apart when deciding who get the score