Dynamic assaults

From Valve Developer Community
Revision as of 07:21, 31 May 2007 by Sortie (talk | contribs) (This should be fairly helpfull. :))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

'Dynamic Assaults' are pretty much just improved usage of the squad AI. They're simply made by setting all npc's on the same team, to the same sqaud name. Eg. All combine soldiers, striders, scanners, metrocops, etc. should have the squad name 'cops'.

Now when any of the 'cops' spot an enemy, they'll all know the location, and all rush towards the enemy, as long as the path is accessable via the nodegraph. Unlike, ai_assaults, these system allows the npc's to pick a path, without requiring huge effort from the mapper.

Setting up a 'Dynamic' Asssault

They is easy. Simply place a bunch of npc's around the map, then set the sqaud keyvalue to eg. 'cops' for combines. This works best in larger non-linear maps, but has proven to work in linear too. And don't forget to place a good valid nodegraph. Once they spot the player, they'll all assault him, by moving to the last known posistion of his. Then, if someone else sees him another place, they'll all move there.


If this system should work perfect, it requires at least one npc, in the squad, to be alive all the time. This can be done by placing a metrocop, or a simple npc, in an offworld location.

Moving forward

You can improve the dynamic of this system in many ways, here's a few suggestions.

  • Place a few combine cameras around the map, and include them in the sqaud.
  • Place a fair ammount of scanners / manhacks, and include them in the sqaud.
  • Use npc_enemyfindes, by simply setting their fov to -1 and include put them into the squad.
  • Make a few ways around your map, and surprise the player at every replay.
  • Use npc_makers, to spawn new npcs as the player moves around, and/or kills other npc's.