About the crossbow.....

  • Thread starter Thread starter Whoohoo
  • Start date Start date
W

Whoohoo

Guest
Hey,

I want to make the bolts that the crossbow shoots fly faster. When I change the air/water velocity the gun shoots very inaccurate. Is there anyway to change this and still keep the 100% accuracy?

Thanks!
 
is this for a mod or just for fun. if its a mod than there might be some constant in the crossbow cpp file that is like power or velocity or something. Try it, just sure though
 
In what way does it become inaccurate? Does it fire randomly, like the pistol's fire cone, or does it always overshoot by a certain amount?

I'm going to predict it's the second one. You need to change the angle at which the bolt is being fired.

Time to get out those trigonometry books.

-Angry Lawyer
 
Yes, it's the second one :) Can you help me? I'd really appreciate it!
 
I'm not very good at maths. Just look at the section of code where the bolt is created and given angles, and change the angle calculation.

I assume you've been at school long enough to know how to do vectors? If you're not good at vectors, just enter some random values until you get a good one.

-Angry Lawyer
 
Angry Lawyer said:
I'm not very good at maths. Just look at the section of code where the bolt is created and given angles, and change the angle calculation.

I assume you've been at school long enough to know how to do vectors? If you're not good at vectors, just enter some random values until you get a good one.

-Angry Lawyer
Just dont type in a too high figure otherwise you will have a pretty good suicide weapon :)
 
SOLVED!

Go to movechars_shared.cpp

change max_velocity to 12000 (or something else)

go to your weapon_crossbow.cpp and change bolt_air_velocity to everything beneath the max_velocity you set up in the movevars_shared.cpp
 
Changed,works ok.
Time to burn some combine ^_^.
 
Makes sense. If you were setting it to a value above the maxspeed, then the calculation of where the crossbow should aim wouldn't match the place the bolt was going, as the bolt would be slowed to the maxspeed.

-Angry Lawyer
 
Back
Top