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.

Zoom Level altering

Discussion in 'Ask a Coder' started by kingzingo, Nov 11, 2001.

  1. kingzingo

    kingzingo New Member

    Joined:
    Nov 3, 2001
    Messages:
    3
    Likes Received:
    0
    Kinda Newbie question coming, but that's what I am :)

    How should I write a multi-level zoom ability into a version of a sniper rifle?

    I've gone through a copy of the Sniper script and follow what it is doing, but as it uses the PlayerPawn's built-in ToggleZoom function I can't figure out how or where to alter the DesiredFOV correctly. Whatever I try seems to yield the same original zoom level each time...

    Anyone got some pointers for me??
     
  2. 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;
    }
    PlayOwnedSound(Sound'UMenu.LittleSelect',, Pawn(Owner).SoundDampening);
    switch (Pawn(Owner).FOVAngle)
    {
    case 15:
    PlayerPawn(Owner).DesiredFOV = 5;
    break;
    case 5:
    PlayerPawn(Owner).DesiredFOV = 90;
    break;
    case 45:
    PlayerPawn(Owner).DesiredFOV = 15;
    break;
    case 90:
    default:
    PlayerPawn(Owner).DesiredFOV = 15;
    break;
    }
    }

    There the code I use, change the numbers to suit you
     
  3. kingzingo

    kingzingo New Member

    Joined:
    Nov 3, 2001
    Messages:
    3
    Likes Received:
    0
    :) Major Thumbs up to you sir!

    Thanks muchly etc.

    I'm now gonna bugger off and have a play.
     
  4. Postal

    Postal I apear to have lost my pin.

    Joined:
    Nov 14, 1999
    Messages:
    1,388
    Likes Received:
    0
    No need to thank me, the bill is in the mail.

    Answer = 000000.10
    My time = 100000.00
    --------------------------
    Total = 100000.10

    Perfered payment in gold bars, but I will take Euros.
     

Share This Page