• NPC spawning behavior question.
    5 replies, posted
Why is it when you spawn a NPC from the menu it works properly but when spawned by using [CODE]local ent = ents.Create( "npc_cscanner" )[/CODE] 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: NPC:Spawn() NPC:Activate() After this it should work fine.
[QUOTE=MDave;23323837]After you spawned your npc you have to activate it with that two functions: NPC:Spawn() NPC:Activate() After this it should work fine.[/QUOTE] Your completely wrong but thanks anyways. That makes no difference.
Well I taken it from the official npc spawn code.. luabin.foszor.com/code
Yup, that code is bugged. I know.
[QUOTE=enjia2000;23382552]Yup, that code is bugged. I know.[/QUOTE] wait.. what? Since when is :Spawn() and :Activate() Bugged? What you are looking for are spawnvalues. Go look them up.
Sorry, you need to Log In to post a reply to this thread.