1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Range and damage of UT sniper rifle

Discussion in 'Ask a Coder' started by meowcat, Aug 2, 2001.

  1. meowcat

    meowcat take a chance

    Joined:
    Jun 7, 2001
    Messages:
    798
    Likes Received:
    3
    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).
     
  2. Kangus

    Kangus Zombie on your pwn!

    Joined:
    Jan 29, 2001
    Messages:
    978
    Likes Received:
    0
    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);
    }
     
  3. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    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.
     
  4. meowcat

    meowcat take a chance

    Joined:
    Jun 7, 2001
    Messages:
    798
    Likes Received:
    3
    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.
     
  5. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    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;
    }
    }
     
  6. meowcat

    meowcat take a chance

    Joined:
    Jun 7, 2001
    Messages:
    798
    Likes Received:
    3
    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
     
  7. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    Why couldnt you have asked something hard?
     
  8. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    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: Aug 3, 2001
  9. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    Mine was how to change the automag's clip size
     
  10. Neuroflare

    Neuroflare Brewer - Patriot

    Joined:
    Jun 21, 2001
    Messages:
    425
    Likes Received:
    0
    you mean you weren't born knowing unreal script?
     
  11. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    As far as I know, most people are born with not much by way of knowledge.
     
  12. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    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
     
  13. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    How did I know you'd say something like that?...
     
  14. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    *Sets mind control device to setting 3*

    Because I put the thought in your mind.
     
  15. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    Again with your predictable responses...
     
  16. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    Hmm wonder why you would say that?
     
  17. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    Because your previous response was predictable.
     
  18. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    True, true, but I prefer the term dependable.
     
  19. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    I would call that inaccurate.
     
  20. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    Then how would you explain it? In ten thousand words or less please.
     

Share This Page