NPC not shooting? New gamemode

Hey, I’m creating a new gamemode derived from the base gamemode, and one of the important things I need in my gamemode are NPCs.

However, when I try spawning an NPC in flatgrass:

	KillerNPC = ents.Create("npc_combine_s")
	KillerNPC:SetPos(Vector(0, 0, 0))

They aim at me, but don’t shoot. How can I make the NPCs shoot at me?

Try going to a noded map. They might just be too far away for flatgrass. They do the aim-and-not-fire thing on non-noded maps for some reason.

gm_construct is noded.

Even on gm_construct, the NPC does not shoot.

The Sandbox gamemode is able to make NPCs shoot at players. What did the Sandbox gamemode do to make the NPCs shoot? Does this have anything to do with NPC schedules?

I have no idea. I’m no scripter, sorry. Is there something other than “ents.Create” that instead specifically makes NPCs? Try that instead, if you can. If not, I’m stumped.

NPCs can shoot in Sandbox and on gm_construct.

The problem is NPCs use special weapons, usually prefixed with “ai_”. Instead of giving “weapon_ar2”, give “ai_weapon_ar2”.

(note: Even though they don’t shoot they should still bash you if you get close enough with regular weapons)

Thanks, that worked well.