Standoff Tutorial

Introduction
In Half-Life 2, Standoffs are an important, yet little known tool for staging combat encounters with Combine Soldiers and Metropolice.  Valve’s example, which was previously distributed in the Source SDK, demonstrated its usage in a Rebels vs. Combine battle.  In fact, the standoff system is useful on a more general level.  They encourage the Combine to take a cautious, tactical approach, moving in and out of cover in a manner not unlike the Locust forces in Gears of War.  In this tutorial, I want to go over how I implement them in my battles.  I will focus on npc_combine_s, the Combine Soldier, but this approach is easily adapted to Metropolice as well.  The names I provide are simply references – you can name things however you want, as long as you keep the relationships the same.

What You Need
First, you need a fairly ordinary setup for spawning enemies.  If you already know how to do this, you can just note the npc_combine_s settings below.
  • An npc_combine_s, the Combine Soldier, with these settings:
    Name: cs
    Squad Name: csquad
    Hint Group: chg
    Tactical Variant: Pressure the enemy (Keep Advancing)
    Flags: Make sure Template NPC is checked.
  • An npc_template_maker, which will spawn the Combine.
    Name: cmkr
    Name of Template NPC: cs
  • A trigger_once with an Output that will Enable cmkr.
Now, the entities responsible for the standoff.
  • Place at least as many prop_static cover props as there are soldiers.  A typical Combine cover prop is models/props_combine/combine_barricade_short01a.mdl.  Alternatively, you can also construct cover out of ordinary brushes.  I would suggest making the brush 48 units tall at least 8 units thick, preferably more.  The brush can be a func_detail.
  • For each cover prop, place an info_node_hint, which will define where the Combine will crouch in cover.  Place these 32-48 units behind the cover and make them point toward the cover prop.  If you built your cover with a brush, just place them along the side of the brush, roughly 128 units apart.
    Hint: Crouch Cover Medium
    Node FOV: 360 Degrees
    Hint Group: chg
  • An ai_battle_line.  This is an invisible line that the soldiers will try to stay behind during the battle.  This line is represented as a pigeon (yes, a pigeon).  Place it in front of all the cover props.  Make the pigeon face away from the cover.
    Actor(s) or squad to affect: cs
    Active: Yes
  • An ai_goal_standoff.  This is the entity that tells the Combine Soldiers to use the standoff behavior.
    Actor(s) to affect: cs
    Start Active: Yes
    Reaction to tactical change: Move immediately
    Aggressiveness: Very High
    Player battleline: No
  • Optionally, one or more npc_enemyfinder entities, placed in locations where the player is likely to be, but where the Combine may not see from the npc_template_maker spawn point.  This entity acts as an invisible tattletale, informing the Combine where the player is, without explicitly telling them to go there.
    Squad Name: csquad
    FieldOfView: -1 (so it sees in all directions)
    Min Search Dist / Max Search Dist: Set as appropriate.
Assembly
Here is a placement example.  In this scene from my CombinationVille map, three Combine will run along the green lines to reach cover.  They will attempt to stay behind the battle line, shown in red.



Tips
  • You can adapt this for npc_metropolice very easily.  The only difference is they don’t have a Tactical Variant selection.  The Tactical Variant mode is important in getting the Combine to run from the spawn point into the battle area, instead of waiting for the player to come to them, so you may want to focus on npc_enemyfinder to lure them out.
  • The Aggressiveness setting adjusts how zealously the Combine will push toward the battle line.  Higher aggressiveness makes them more likely to push forward, occasionally crossing the line if they see fit, whereas lower aggressiveness will make them favor staying in cover until the player comes to them.
  • The Reaction setting adjusts what causes the Combine to move from cover to cover.  The Move Immediately setting causes them to always change cover positions instead of contemplating it.  The “Stay at Cover Location” setting on the ai_goal_standoff will make them stay in cover permanently.