sdk_headcrab problems

James Isaac

Newbie
Joined
Sep 24, 2003
Messages
465
Reaction score
0
Hi,

I followed this tutorial on how to add the headcrab into an MP project.

First I had the problem that it couldn't find ai_interactions.h, but I added that file and that bit worked.

But when I spawn one in game, it walks round until it comes up to me, and then it raises it's front legs in the air, and goes back down again. So it does no damage. I want to it jump onto my head and hurt me.

So I tried including the file sdk_headcrab.h (previously called npc_headcrab.h - and I changed the npc_headcrab lines to sdk_headcrab). But they still don't attack. How can I make them attack?
 
Code:
if ( pEvent->event == AE_HEADCRAB_JUMPATTACK )
  {
    DevMsg("JumpAttack!"); // no damage for now, have to look into melee damage some more
    return;
  }

There's your problem. They haven't implemented combat damage in that tutorial. Try looking at the original headcrab's AI, it might give you some pointers.

-Angry Lawyer
 
Back
Top