Grouping NPCs into squads In Game

nX1

Newbie
Joined
Nov 27, 2004
Messages
67
Reaction score
0
Improved NPC AI

Heres the way to make npcs a lot smarter.
(these instructions assume that one has a good knowledge about spawning NPCS

First type in console: Developer 2 This will show console information in the top left corner of the screen. To turn it off type Developer 0

Ive found that the npcs that have already been created in Hammer are a lot smarter than those that one would spawn in their console. This is because the ones that can be created in hammer can be grouped into Squads. When a group of NPCs are in a squad they share information about enemies and cover eachother. When one spawns NPCs ingame, they are not in squads and do not act together. There is a way to group NPCs into squads ingame. Here are the steps.

1. the first thing that one must do is to spawn some NPCs. First go into console, and type in sv_cheats 1, then type in notarget, that way the NPCs wont be able to see you. Then spawn some combine soldiers. At the moment they are not in a squad. The first step in creating a squad is to give those combine soldiers a name. In console type in: bind L “ent_setname combine”. Now place your reticule over one of the spawned soldiers and press L. that soldier now has the name of combine. Do this for the rest of the soldiers until they all have the name of combine.

2. Now that the soldiers all have names, they need to be placed into a squad. Type in console: bind m “ent_fire combine setsquad 1”. Combine is the name of all the soldiers, and the number 1 is the squad name. Now all the combine soldiers you spawned are in the same squad, and they will now act together in order to kill you.

3. Additionally you can tell the soldiers to move around. In console: bind k “ent_fire combine startpatrolling 1” this will tell the soldiers to patrol an area. When you attack one of the soldiers the rest will come to its assistance.

4. If you have followed these instructions carefully, the soldiers should now be in a squad.

5. Note: these commands can also be used for other NPCs such as: Npc_citizen, Npc_metropolice, all of the npc_zombie classes and so on. Note only some NPCs can use the command “startpatrolling.”
 
Back
Top