1- Stupid engine function CheckClient(); only allows for monster vs human battles.
2- Movetogoal and Walkmove cause stupid zigzag motion.
3- They're deaf.
4- They're blind. AI codes attempts to mimick vision by using code like infront() but doesn't take light levels and stuff into account.
5- Only notice one enemy at a time.
6- Can't lose an enemy once he sees you. He magically knows where you are at all times once he spots you.
7- Either sees you completely, or doesn't have a clue where you are. AKA can't get suspicious like in MGS.
8- Can hardly navigate around a corner, let alone a sophisticated map.
9- Doesn't use environment to his advantage (ie crouch behind boxes, hides around corners).
10- Can't walk over edges.
11- He is unaffected by water. If he runs into water, he doesn't drown or float or anything. Heck, you can even still hear him grunt!
I can keep going, but I won't.
So after much thought, I've decided to completely scrap almost all the Quake Singleplayer AI (including spawning monsters and stuff) and rebuild it myself. So far, I got a grunt to spawn, check around for any entity that has a health value, face it, and attack it (or run towards it if it's too far). I also made it be able to find and take items when it needs it. However I was still moving him around Quake style (moving his origin forward little bits at a time).
I gave him MOVETYPE_WALK. I started moving him through velocity, but I think I am doing it wrong. Here's the one line of code I'm using:
Code: Select all
makevectors(self.v_angle);
self.velocity = v_forward * self.walkspeed;
When I did this before I used MOVETYPE_WALK, it worked fine:
Code: Select all
self.origin = self.origin + v_forward * self.walkspeed;
So, anyone did this before? I could really use some help
Thanks!