Scripted NPCs

One of my current goals with GMod is to add Scripted NPCs. Valve’s AI shit is kinda simple on the outside. Define schedules which contain tasks. Simple scripting type stuff. But you start to hate it once you have to start ripping the macros apart and trying to find out what the fuck is really going on.

But I managed to do it. Right now my implementation allows you to make new tasks and schedules. But now I’m starting to think that might not be the best way to do this shit for Lua. I guess I really need to know what kind of NPCs people want to make. Right now it should be fine for making things like SIMS characters (although you’d have to make new models with new animations etc). But the code is kind of messy because it’s mimicking Valve’s stuff. Like melting cheese over some-one’s hand instead of giving it to them in the packet.


So here’s a couple of my experiments. First of all we have these fighting women. They run up to each other and play the melee attack/jump animation. Pretty much totally basic stuff. Here’s a video of them in action.


Then we have dirty Mossman. She randomly stops and dumps a big stinking load of shit wherever she is. Video of HOT POOPY ACTION (Also below).