I'm trying to make an npc spawn in the world that is a specific model. I'm using this code:
[code] local npc = ents.Create( "npc_citizen" )
if ( !IsValid( npc ) ) then return end
npc:SetModel( "models/rtbmodels/pokemon/arcanine.mdl" )
npc:SetPos( Vector( 2355.857422, 66.318863, -12735.968750 ) )
npc:Spawn() [/code]
The npc spawn, but it is an error. I changed the gamemode to sandbox and spawned the npc, and it was not an error. Is there a specific folder I need to put the player model in?
Any console errors after it spawns as an error?
[QUOTE=code_gs;47875296]Any console errors after it spawns as an error?[/QUOTE]
There are no console errors.
When SetModel changes a model to an error, there should be some kind of model notification over it not existing.
[QUOTE=code_gs;47875451]When SetModel changes a model to an error, there should be some kind of model notification over it not existing.[/QUOTE]
When I kill the npc it says:
ERROR! models/Humans/Group01/arcanine.mdl missing ACT_SIMPLE
You didn't make that model, did you? I might be able to find some QC tips if you did.
Sorry, you need to Log In to post a reply to this thread.