Range and damage of UT sniper rifle

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

meowcat

take a chance
Jun 7, 2001
803
3
18
Howdy all. I noticed the other day that the UT sniper rifle seems to have a max range. I was playing ctf in ctf chasm and was shooting at opponents (or rather trying to) all the way across the level. I noticed I could kill bots almost all the way across, but after a certain range My rounds no longer reached them. Does anybody know a way to increase the range or locate the integer values that dictates the range? I have made a dragunov sniper rifle model and am using slightly altered sniper rifle code. I alos wish to make a model .50 cal barrett rifle which should have an extremely large max range. Also on this topic, why is the damage inflicted on enemies for non headshots 66, when in the uscript the value was 45 for the sniper rifle? Is there a scaling factor in there? I would like to lower this value so I can make a full auto "zoomable" sniper rifle/submachine gun that is not completely unbalanced (note I will lower the value of the headshot damage).
 

Kangus

Zombie on your pwn!
Jan 29, 2001
978
0
16
Illinois, USA
www.planetunreal.com
hope this helps a bit. Not sure on the damage thing


function TraceFire( float Accuracy )
{
local vector HitLocation, HitNormal, StartTrace, EndTrace, X,Y,Z;
local actor Other;
local Pawn PawnOwner;

PawnOwner = Pawn(Owner);

Owner.MakeNoise(PawnOwner.SoundDampening);
GetAxes(PawnOwner.ViewRotation,X,Y,Z);
StartTrace = Owner.Location + PawnOwner.Eyeheight * Z;
AdjustedAim = PawnOwner.AdjustAim(1000000, StartTrace, 2*AimError, False, False);
X = vector(AdjustedAim);
EndTrace = StartTrace + 10000 * X; <-- the 10000 is the max distance I think
Other = PawnOwner.TraceShot(HitLocation,HitNormal,EndTrace,StartTrace);
ProcessTraceHit(Other, HitLocation, HitNormal, X,Y,Z);
}
 

Postal

I apear to have lost my pin.
Nov 14, 1999
1,388
0
0
WoD.BeyondUnreal.com
Kangus is right there, thats the range.

About the damage, damage in the code is what would be if the game was played in "Classic" mod, but ut defaults in , umm mega, or execisve, or something like that, so Damage in the code is something like x 1.1 or 1.2.
 

meowcat

take a chance
Jun 7, 2001
803
3
18
Thank you !!

Thank you oh so much. this will help greatly especially since I missed several opportunities the other day to take the neighbor kids to school with ultra long range headshots. and now I need to know where to locate the value for max zoom. I know this has to do with FOV, however where do I change the desired FOV value that I saw mentioned in the code, and if I change this will it affect all weapons that zoom and use modified versions of ut's sniper rifle code? I want to lessen the zoom capability on one rifle, and greatly increase it on another. Thanks again for the help on range and damage.
 

Postal

I apear to have lost my pin.
Nov 14, 1999
1,388
0
0
WoD.BeyondUnreal.com
function AltFire( float Value )
{
if (Pawn(Owner).IsA('Bot'))
{
Fire(Value);
return;
}
switch (Pawn(Owner).FOVAngle)
{
case 15:
PlayerPawn(Owner).DesiredFOV = 90;
break;
case 45:
PlayerPawn(Owner).DesiredFOV = 15;
break;
case 90:
default:
PlayerPawn(Owner).DesiredFOV = 45;
break;
}
}
 

meowcat

take a chance
Jun 7, 2001
803
3
18
Works perfectly

Thanks a lot Postal. it works wonderfully I now have dragunov sniper rifle that shoots 20000 units and zooms in to long range thank you. When I release this in a weapons pack sometime I will definitely mention you both thanks. meowcat
 

Smoke39

whatever
Jun 2, 2001
1,793
0
0
Everyone's gotta start somewhere. Remeber my first questions? Neither do I, but I bet they were simpler than this.

EDIT: I remember one of 'em now. I wanted to know how to make the GasBagBelch last a shorter amount of time before exploding. Hehe, that was pretty simple.
 
Last edited:

Postal

I apear to have lost my pin.
Nov 14, 1999
1,388
0
0
WoD.BeyondUnreal.com
Well I was born with knowledge of projectile fire, traces and weaps that used thoses were like greek to me, while at that time when I asked that question, I knew the stinger like the back of my hand, the automag was something completle foren to me