Coding Questions

  • Thread starter Thread starter badpigeon
  • Start date Start date
B

badpigeon

Guest
Im just going to post all my coding questions in this thread from now on... I dont want to keep making new threads and spamming the forums.

My first question is this. How would I go about adding a Rocketpack feature to HL2MP. I was thinking about adding a feature that would allow the player to press a thrust button, and it would propel the player into the air for a set time. Im not going to worry about making the player model for it yet.

Where abouts in the Source would the movement code be? and does anyone know where I should start with this?
 
Try checking out the CGameMovement:: PlayerMove() in game_shared\gamemovement.cpp.

I was able to do something very similar to this back in HL1. Just make sure any code you write is shared across the client and server so you don't get quite so much chopiness going on. If you need more help, just ask here.
 
Yes, I know there is something in the gamemovement.ccp called MOVETYPE_FLYGRAVITY;

It lets you fly, be effected by gravity, and collide with objects.

I found this tutorial online for HL1 Flying. http://www.planethalflife.com/hlprogramming/tutorial.asp?i=237

But the code is significantly different because the cpp files used in HL1 are different in HL2. If you could help me figure out how to do this, I would be very greatfull. It doesent look like there is much coding involved since in HL2, they have already added the FLY movement type. Its just interfacing it to a bindable command like +move. Any help is appriciated!
 
Nevermind, I found a tutorial on wavelength that does what I wanted to do, thanks for all the help though!
 
can you link me to the tut? it would really help me!
 
Back
Top