Page 1 of 1

Need help creating custom ammo/projectiles

PostPosted: Sun Dec 20, 09 7:59 pm
by Giger
Hey everyone, I'm very new to all this modding business, and I'm having trouble with two things:

First, I tried creating a sniper rifle that fired tranq darts, and suceeded, but the dart fly range is the same as it was in the minicrossbow. I tried changing the projectile default properties, but I didn't find anything that worked.

My question is: How can I extend the flight range of the tranq darts?


Second, I've been trying to create rubber bullets for the shotgun, shells that knock foes unconscious instead of killing them, but I've been unable to find out how to change ammo properties at all.

So my second question is: how can I modify ammo to make it non lethal?

Thank you in advance for all your help ;)

PostPosted: Sun Dec 20, 09 10:49 pm
by ~[ß]Lost~
I think for all that you will need a custom projectile class. I'm most likely wrong though, I only do mapping.

PostPosted: Sun Dec 20, 09 11:00 pm
by Allan
~[ß]Lost~ wrote:I think for all that you will need a custom projectile class.


Yep, you do.
There's two ways to increase shot length in projectiles.

1: There's two variables that control range in projectiles. Unfortunately, I can't remember them off-hand.
2: Make Tick() do nothing. At all.

To do 2, stick this code into the new projectile class code:

Code: Select all
function Tick(float Deltatime)
{}


If you want people KO'd instead of dead by the darts, when you get the custom projectile class made, stick this in the defaultproperties section.

Code: Select all
damageType=KnockedOut


Make a projectile class off of Dart with those bits in the code tags, and you should have a dart that will fly forever and knock people out on contact.

PostPosted: Sun Dec 20, 09 11:10 pm
by Giger
Thank you very much for your help, I'll try that later :wink: