NPC spawning behavior question.

Why is it when you spawn a NPC from the menu it works properly but when spawned by using

local ent = ents.Create( "npc_cscanner" )

it fails init or schedule properly, most specifically to firing a weapon or in the case of the city scanner to take a picture?

After you spawned your npc you have to activate it with that two functions:


After this it should work fine.

Your completely wrong but thanks anyways. That makes no difference.

Well I taken it from the official npc spawn code…

Yup, that code is bugged. I know.

wait… what? Since when is :Spawn() and :Activate() Bugged?

What you are looking for are spawnvalues. Go look them up.