Any hl2 npc lua codes?

Someone remade the weapons from hl2 into lua has anyone done this with npcs? preferably a hl2 zombie npc.

I just can’t get the walking, turning, and fighting right. The walking is delay or the player the npc walks up to gets the player stuck. The turning is always spazzing when the npc trys to face the enemy. And The fighting is not quick enough to hit anyone and has random misses when it should have hit.
I just want a reglar hl2 zombie but with a few custom actions to it.

I’ve been working on this for a few weeks any help or code to look at would be very appreciated.

Unlike weapons, the npc entities (npc_zombie, etc.) are much, much, much more configurable. Just take a look at the huge NPC entity metatable in the wiki and you’ll soon discover that there’s little to no need for someone to recreate the Valve npcs.

Then why arn’t there any snpc that work very well?

Because they’re complex entities and most people just copy and paste the same SNPC code but change the models and animations (and maybe the behavior).

If you want a really good SNPC sample, look at this:

Also, there’s a recreation of the HL2 NPCs where the author removed the headcrab models:

Hope you find this usefull.

Because no one is making snpcs, they’re using the npc entities :3:


And Garry didn’t really try very hard on the NPC port for SNPCS anyways :v:

Thanks for the replies guys.

Well that headcrabless zombie is just a Classic zombie with rambo6’s same old npc script. The smod one is alot different though I will definitely look over that one for awhile.

Oh I totally read your first post the wrong way. I thought you meant snpcs are much more easier to make than sweps, but I see what your saying now.