Spawning a NPC from the 'q' menu with a SMG allows a Combine soldier to shoot.
Doing the same thing with lua code results in the npc NOT shooting. What Gives?
[CODE]
function ENT:SpawnFunction( ply, tr )
if ( !tr.Hit ) then return end
local SpawnPos = tr.HitPos + tr.HitNormal * 20
local ent = ents.Create( "npc_combine_s" )
ent:SetPos( SpawnPos )
ent:Give("weapon_smg1")
ent:Spawn()
ent:Activate()
return ent
end[/CODE]
Wouldn't it require a schedule?
Like a schedule to attack?
It shouldn't because the spawn menu doesn't give it a schedule.
If anyone knows where the default sent's are located, please look in them and see if they have sched's, because I have a hunch they do...
Do you mean the default HL2 entities?
[QUOTE=Clevin;23289579]If anyone knows where the default sent's are located, please look in them and see if they have sched's, because I have a hunch they do...[/QUOTE]
... I'm confused. I thought it was about NPC's.
I assume he meant SNPCs, because they are entities too.
Should have wrote SNP's instead of SEnts, then.
Anywho, I dont know where it's located, sorry.
[QUOTE=Clevin;23289579]If anyone knows where the default sent's are located, please look in them and see if they have sched's, because I have a hunch they do...[/QUOTE]
the base entity is "base_ai" the only schedule it runs is SCHED_IDLE_WANDER
the ones from the NPC spawn in differently.
Sorry, you need to Log In to post a reply to this thread.