Help with NPCS

C++ Got ya down? Half-Life 2 Coding Related.
Post Reply
longshanks
Pixel
Posts: 2
Joined: Thu May 17, 2007 3:09 am

Help with NPCS

Post by longshanks » Thu May 17, 2007 3:21 am

Hey guys, I love your mod.. it kicks ass. I also played thru Missing Information which was great too, and I know you were part of that.

I'm trying to implement the houndeye and the bullsquid into a SP mod I'm making with my friend. So far I've got both working to an extent.
They are both ingame but each one has issues. I'd post a pic but I'm not allowed to yet.

Houndeye:

-For some reason, his sonic attack doesn't show up. I was missing some files related to the energy wave which I was able to dig up from a doxygen version of the sdk online. As far as I can tell, both the client side and server side stuff for this that was missing was added... and yet I still can't see his sonic attack.

Bullsquid:

His tailwhip doesn't do any damage, and also his spit looks terrible (the sprites are messed up) and often it goes off in wierd directions. I want to make it more like how you have it working in OC.

Thanks in advance, hopefully you guys can help me.

User avatar
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz » Thu May 17, 2007 10:11 am

From what I remember the Sonic attack didnt have any completed code, so I just made my own. Its a ring effect Valve made that is sort of angled.

Code: Select all

   CBroadcastRecipientFilter filter2;
   te->BeamRingPoint( filter2, 0.0,
      GetAbsOrigin(),                     //origin
      16,                              //start radius
      HOUNDEYE_MAX_ATTACK_RADIUS,//end radius
      m_iSpriteTexture,                  //texture
      0,                              //halo index
      0,                              //start frame
      0,                              //framerate
      0.2,                           //life
      24,                           //width
      16,                              //spread
      0,                              //amplitude
      WriteBeamColor().x,                  //r
      WriteBeamColor().y,                  //g
      WriteBeamColor().z,                  //b
      192,                           //a
      0                              //speed
      );

   CBroadcastRecipientFilter filter3;
   te->BeamRingPoint( filter3, 0.0,
      GetAbsOrigin(),                           //origin
      16,                                    //start radius
      HOUNDEYE_MAX_ATTACK_RADIUS / 2,                                 //end radius
      m_iSpriteTexture,                        //texture
      0,                                    //halo index
      0,                                    //start frame
      0,                                    //framerate
      0.2,                                 //life
      24,                                 //width
      16,                                    //spread
      0,                                    //amplitude
      WriteBeamColor().x,                        //r
      WriteBeamColor().y,                        //g
      WriteBeamColor().z,                        //b
      192,                                 //a
      0                                    //speed
      );


Hyper did the bullsquid fixes, nothing difficult. By default the spit is a model I believe. You could change it to a sprite if you wanted. Hyper is really the one to ask about the bullsquid though.

longshanks
Pixel
Posts: 2
Joined: Thu May 17, 2007 3:09 am

Post by longshanks » Fri May 18, 2007 12:48 am

Ah ya ok.. thats code from the combine ball right? Nice... I'll try and add that in later today.

My bullsquid though shoots sprites not models, I guess Ill have to switch that around and it still shoots in strange directions.. maybe one of the vectors is off... and the tail still doesnt work.

Thanks so far for the help though!

User avatar
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz » Fri May 18, 2007 3:26 am

Well its not that tricky, should be a direction, vector, some velocity. Is your starting vector a bone or attachment? That might be messed.

Post Reply