home · browse · search · game entities · user directory · message board · IRC | register

October 16, 2006, 7:35 pm PDT
forgot password?

Popular Resources
  • Half-Life 2 Mod FAQ
  • Valve Hammer Editor
  • Hammer 3.5 beta test
  • Half-Life Utilities
  • game data files
  • ZHLT 2.5.3 custom build
  • Half-Life SDK
  • Feedback
    If you've got any feedback, suggestions, or bugs to report regarding the Collective website, go here!

  • Feedback (301)
  • Newsletter
    Enter your email address in the above form to add yourself to the email newsletter list. Click here for more info.

    Hosted Sites
  • Valve ERC
  • Collective
  • TFMapped
  • Spirit of Half-Life
  • Selective Design
  • Pixel Reviews
  • recent articles

    NPC and Item Placement Theory
    17/03/05 11:35pm PST
    Non-Player Character (NPC) and item placement can influence both the gameflow and immersion of a level. This article aims to give some pointers on how to properly place them.
    - Hugh 'Hugh' Lloyd

    Got Props?
    13/03/05 08:32am PST
    A common problem in HL2 mapping is props not showing up in game. This article explains why and offers solutions.
    - Jeff 'Yesukai' Pritchard

    Simulating Randomness
    18/12/04 11:29pm PST
    This article focuses on how to properly simulate random events that should occur at a certain average frequency, or within a certain probability per period of time.
    - Skyler 'Zipster' York

    Adding Single-Player Weapons to Half-Life 2
    15/12/04 06:52pm PST
    Covers the process behind adding weapons to a single-player Half-Life 2 modification.
    - Skyler 'Zipster' York

    Your world in HL2
    06/12/04 12:17am PST
    This article gives tips and advice to anyone wanting to make custom photorealistic textures to be used in Half-Life 2.
    - Oksid

    Hiding in Shadow
    21/08/04 01:11pm PDT
    Describes how to create a function that has monsters disregard you if you are hiding in a certain level of "darkness," which can be set from within map properties.
    - Anders [Wolf] Jenbo (NoBody)

    XSI EXP for Half-Life 2 Tutorial - Camera Control
    23/09/04 12:43am PDT
    A SOFTIMAGE|XSI tutorial explaining all of the camera controls available to you in XSI!
    - Josh Enes

    Bump Mapping in Half-Life
    08/08/04 11:58am PDT
    Details a method of achieving real-time bump mapping in Half-Life, and provides an implementation of the algorithm.
    - Francis 'DeathWish' Woodhouse

    Real-Time "TRON 2.0" Glow For Low-Spec Hardware
    19/06/04 02:06pm PDT
    A sequel to the original "Real-Time 'TRON 2.0' Glow" article, this describes how to implement real-time glow that works on low-spec graphics cards.
    - Francis 'DeathWish' Woodhouse

    Hitboxes and Code
    05/06/04 06:25pm PDT
    How do I make only one part of a monster take damage? Learn about the relationship between model hitboxes and what you can do with them in a characters code.
    - Jonathan 'Teh_Freak' Smith

    Making a Territory Control Map
    [Sun Jun 15, 2003 / 10:16am PDT] Tim Holt - comments (1) comments enabled

    This tutorial explains how to make a basic map where there are flags to capture. If one team captures (by touching) all the flags, then that team wins. This is the most popular type of map, and is the style used by Caen, Flash, and Donner for example.

    Besides the details on the entities required and how they work together, the tutorial also includes tips on making a balanced flag map, plus a simple example map (source included) to help you along.

    Basic steps

    1. Place flags in your map where you wish them to be. Flags are dod_control_point entities. Set the "Group" attribute of the control points to be something like "myflags".

    2. Add a dod_score_ent to your map. Set it's attributes as follows...

      Nameaxis_winThis is the name of the entity. We'll need this so we can trigger it if the Axis wins by taking all flags.
      For TeamAxisThis is the team that wins when this is triggered.
      Points10This is how many points the Axis team get if they win the round by capturing all flags.

      This entity will be triggered if the Axis team captures all the flags in the map.

    3. Add a second dod_score_ent and set it's attributes as follows...

      Nameallies_winThis is the name of the entity. We'll need this so we can trigger it if the Allies wins by taking all flags.
      For TeamAlliesThis is the team that wins when this is triggered.
      Points10This is how many points the Allied team get if they win the round by capturing all flags.

      This entity will be triggered if the Allied team captures all the flags in the map.

    4. Add a single dod_control_point_master. Set it's attributes as follows...
      Target when allies winallies_winEntities with this name will be triggered if all flags are captured by the Allies.
      Target when axis winsaxis_winEntities with this name will be triggered if all flags are captured by the Axis.
      Group namemyflagsThe same group name you gave all your conrol points.

    How it works

    When all the flags are captured by one team, it triggers the dod_control_point_master, which in turn triggers the appropriate dod_score_ent based on what team won. The dod_score_ent triggers the end of the round.

    Here is a screenshot from WorldCraft with some annotations to show the basic flow of the entities involved...

    Basic flow of entities in a control point map

    When all flags are captured, the dod_control_point_master activates the appropriate dod_score_ent based on what team has captured the flags.

    Some notes on making a good and balanced flag map

    You will want to think out just where you place your flags in your map. Well placed flags will be challenging, but not impossible to capture (or defend). Also well placed flags will not give one team an advantage over another. Here are some pointers and tips to making your flag map balanced.
    • An ideal map probably has between 4 and 6 flags all told. The more linear the map is, the more flags you can have. Maps that are very spread out and non-linear may be difficult to win if they have too many flags. With many flags, it will be hard for a team to capture and subsequently defend flags.

    • Don't make a flag so easily defended that it can never be captured

    • If your map is a linear map (such as Caen), place your flags such that they are spaced out the same on both sides. Imagine if an Axis and an Allied player both spawn at the same time, and both start running for the closest flag. They should each reach their respective closest flag at the same time. Basically you don't want one team to initially capture more flags just because the flags are closer to them. You COULD do this though if you were to also give them some disadvantage, such as having the flags be very hard to defend. Or make it so that the flags the team with fewer initial flags gets are easy to defend. Then the team with fewer flags initially can at least defend them well, and thus put more effort into capturing more flags.

    • Make sure it's easy to see and find flags. Don't put them in obscure places, dark rooms, or other spots where players won't be able to find them.

    • Place flags in areas that are representative of their location. For example if you have a small plaza, and you want a flag to be there, put it in the middle of the plaza so it's symbolically "The Plaza Flag". If you had a bridge, you'd put a flag on the bridge to be "The Bridge Flag".

    What else can you do?

    There are various tricks and other things you can try with flags to take a map beyond the normal "capture the flag" style. There is definitely some room for experimentation on the part of a creative mapper! Here are a few thoughts and ideas...
    • Because you have a group attribute for flags, you could theoretically have several flag groups in one map. Remember that a round doesn't end just because the flags get captured. It ends because the dod_score_ent tells it to. With groups, you could have some special event be triggered when one group of flags is captured. For example a team might gain a forward spawn when they capture all three flags in one group. There definitely is some room for experimentation and interesting ideas with this ability.

    • dod_control_point_master also has a "Master" attribute. If the master's state is OFF, then all flags in that control point master's group will NOT be drawn nor be active. If the master is ON, then the flags will be drawn and will be active. You could use this to have the flags change based on the state of a master (usually an env_state)

    • It is also possible to disable drawing of the HUD flag states on the HUD for select flags. Some maps utilize "hidden" flags with preset ownership to award points to a team over time. These flags should not be visible on the HUD, as there is no way for a player to actually capture them.

    • You may use HUD flag icons other than the default flag symbol. For simple flag captures, this probably won't be something you'd want to use. DoD comes with a number of symbols, including tanks, jeeps, bridges, etc. This might be useful especially for flags tied to dod_capture_area entities, it could be useful.

    • If you want a flag to be "captured" not by players touching them, but instead by some event, you can use a dod_point_relay entity to trigger a flag's capture by one team or another.

    Example Map

    This zip file contains a complete mini-map with several flags. You may download it and use it to learn how flags work.
    article created on Mon Jul 08, 2002 / 10:04pm PDT
    this item has been viewed 4750 times
    [Day of Defeat / mapping]

    Only registered users can post comments. Have you registered yet?

    user comments

    displaying comments of normal or higher rating


    Tue Apr 04, 2006 / 03:37am PDT

      tutorial zip link down

    VERC © 2004. All content copyright its respective owner, all rights reserved.
    script execution time: 0.0978639125824 seconds