Video Modding Tutorial: How to use Combine soldiers in maps

In this 6 minute video, Abraham Lee AKA ihonnyboy discusses how modders should use Combine soldiers to get the most out of them but also how players should play against them.

This is actually two separate issues. Due to the way combine use “attack slots,” its possible a soldier won’t be able to shoot after flanking the player. Typically, another soldier will be moving in, so this isn’t an issue unless the environment is particularly large. The soldier will than take cover, but this can often be at close range (Watch the scenes in the dev map and the stair case). This can be fixed with map layout, scripting, or staggering spawning. The other issue is when their cover “schedule” fails. This can be due to multiple reasons. Such as not being able to find cover or where they’re moving to has become invalid. If they can’t shoot AT THIS EXACT MOMENT IN TIME, due to the fact other soldiers are engaging, than they’ll charge. Ironically, the soldier charging can gain that “Attack slot” while charging, so they’ll end up running and gunning. The best way to fix this is node placement, cover placement, number of squad members, or controlling where a soldier can navigate. It’s very confusing. Use “ent_text” command to get more information on your case or check the Github code.

Some other facts:

– Scripted grenade throws don’t remove grenades from a soldier’s pool of grenades.
– Soldiers only use the Shot Regulator when moving and shooting. Basically, standoffs act funny.
– Soldiers will grenade allies, just not squad members.
– Soldiers use “combat” animations while in assaults, even if they’re not in a “combat” state.
– Soldiers won’t hide to reload if they’re current enemy doesn’t have a range attack. (hint grouping causes them to do so.)
– Soldiers don’t talk as much as Metrocops.
– Soldier will stop flanking or charging if they find a “new enemy.” (What exactly makes an enemy “new” is still hazy to me)
– A lot is done in their code to control when they begin moving and shooting. There’s everything from a shoot delay to out right disabling the ability in certain circumstances.
– There’s a lot of special conditions and fall back cases in their ai that controls how they function in large, open environments. Think a hilly plain more than 3000 units long, way past the AR2’s max attack range.
-Soldier are more susceptible too bad node graph placement than most other npcs, so be mindful of your nodes.
– Their ai often works best in groups of 2-6.
– Their ai was changed during the orange box update.

I’m considering redoing this focusing on the philosophy behind these ai design decisions or a collaborative work with Jim Partridge. Comment below if you’d like to see this.

Help me create more and better content - please support me on Patreon

Help me create more and better content - please support me on Patreon


  1. Salamancer

    A decently edited video, soldiers can be really smart if you know how to work them. They’re a tool after all, just a little more complex than regular melee units.

    I particularly liked the sections about weapon usage, and how they should fit into your maps. I’m probably a little guilty of overloading on AR2s in Synthesis at the end, because in my mind, that’s just the gun Elites use. Perhaps I should have made the elevator and upper floor Elites AR2, and the rest SMGs.

    One major thing that I felt was missing was the more advanced entity usage for informing them of the battle field. Putting them in a squad automatically forms a lot of their AI, and how they engage the player, but what about battle lines, rally points and assaults?

    1. Assaults basically say, “I want you to move here at your convenience,” following any rally points along the way, which makes them different from more scripted approaches. It leaves it up to the AI to decide when it’s safe to move and when it would prefer to fight, always keeping its intended destination in the back of its head. They can also be used to create dramatic, natural looking fallback sequences, such as at the end of the Alyx defense in the return to City 17 when the gate opens and all the rebels backpedal through it while attacking the remaining Combine. That’s really the best example map for unlocking the full potential of Combine Soldiers.

      Battle Lines are used in conjunction with Standoffs to make enemies stay behind an invisible line, taking cover at objects behind it, and optionally try to push their way to the line. Standoffs don’t need Battle Lines to get the cover behavior, though. I use them pretty extensively because I like the pop-out-from-cover gameplay, so Forest Train, Avenue Odessa and even Truss have examples of this. You can always disable the Battle Line later to make the Combine go into a free-for-all.

      Another method that works really well is to put all the Combine in a squad (you’d want to do this anyway) and stick an npc_enemyfinder up in the air as part of the same squad. The finder is an invisible, tattletale NPC that will tell everyone else where the player is, but leaves it up to them to decide how to get there.

      All are superior approaches compared to the aiscripted_schedule “Set player as target and run at the player” approach, which sucks. But the VDC does a poor job of explaining Assaults and Standoffs. They aren’t that hard to use, but their explanation and examples make them sound way more complicated than the average use case really is. I know Ihonnyboy has worked to clarify the language.

      1. An additional note about assaults, is the ai will only take cover to reload. This can be useful with any of the accurate combine units (metrocops included), essentially “suppressing” an opponent.

        Changing hint groups are also be very handy, especially since the combine stop shooting when moving to far away cover, but they’re even more general than assaults. You see the squad ai stuff mentioned? With a hint group change some of the soldiers would still stay and shoot and the others would move to that hint group to take cover, but this only happens when the ai makes the decision, so it’s a little unpredictable. Also, hint grouping soldiers makes them take cover from melee units, something mentioned in the original video’s description.

  2. Good stuff. I imagine this would be really worth knowing if you’re playing on hard. On medium difficulty, run, hide, shoot, retreat, attack, repeat is generally good enough. Keep moving is probably most important thing to keep you alive.

Leave a Reply