Team score with brushes

From Valve Developer Community
Jump to navigation Jump to search


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 and then create more the same way if you need to.