• NPC's/Props spawned via ents.create have no hitbox.
    1 replies, posted
Second thread of the night... Anywho, When I spawn a prop/npc via ents.Create (""), the prop/npc doesn't have a hitbox even when activated. I'm sure I'm missing something but eh, does anyone have any ideas? (Bit of code regarding the NPC's spawning:) [CODE]local ent = ents.Create ("npc_manhack"); ent:SetPos (self.Owner:EyePos() + (self.Owner:GetAimVector() * 14)); local angle1 = Angle( 0, self.Owner:EyeAngles().y, self.Owner:EyeAngles().r ) ent:SetAngles (angle1); ent:SetOwner(self.Owner) ent:Spawn(); ent:Activate()[/CODE] (I've been using this bit for spawning stuff lately. And yes, I know the bit forcing the Pitch is unnecessary for an npc like the manhack. )
There's your problem: ent:SetOwner(self.Owner)
Sorry, you need to Log In to post a reply to this thread.