Map-Spawned NPCs don't care about the player.

Hello Garry’s Mod mapping community!

As an experienced mapper who loves to push hammer to it’s limits, I’ve decided to test some new map ideas to put my skills to the test and get even better… Part of this involved NPC pathing and navigation, as well as interaction and combat. There is a couple problems I diagnosed that I cannot seem to troubleshoot, and I need your help to figure this out.

What I am doing:
There is a logic_relay triggered by console to spawn four combine solders in squad “squad01”. They spawn when the relay is triggered and have an info_node system in the map (it’s a small dev map, so their connections are flawless). The player is on top of a ramp, aiming at the door the combine spawn inside of. When they spawn, the idea is to have them come running out of the door via a path_track. So far, this works. Here are the problems.

Problem 1)
The combine do not engage once they lose sight. They will make no effort to run around barrels, walls, or hallways to pursue the player. However, if I spawn a GMod NPC via the “Q” menu, these combine NPCs WILL pursue the player and will not stop until they are killed. They will use the node’s I placed around the map. The map-spawned NPCs however, give up once the player is gone. They just don’t care.
Problem 2)
The map spawned NPCs will not open doors. The “NPCs Can’t” flag is NOT checked. Gmod spawned NPCs will move towards the door, but will not open it either. Map-spawned NPCs will not even attempt to move towards the door.

Thanks in advance for any assistance you can give me with this.


New information:
Map-spawned NPCs, and Gmod NPC’s are unable to open any type of door, and will not walk through a door_rotating. To get them to go through a door, it has to be a func_door, and I have to use a path_track. This is beginning to be extremely frustrating…


Got it! NPCs cannot open a func_door it seems. They can, however, open a prop_door_rotating. To do so, you need to place an info_node_hint with hint “entrance / exit pinch” in the center of the door. They will now open and travel through the doorway.

If anyone figured out how to get NPCs to open a func_door, please let me know. Otherwise, solved!

You could use trigger_multiple with npc flag checked near the door. I don’t think it’s best solution with lots of npcs tho.