Zoom Level altering

  • 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.

kingzingo

New Member
Nov 3, 2001
3
0
0
57
Thailand
www.purpletiger.com
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??
 

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;
}
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
 

Postal

I apear to have lost my pin.
Nov 14, 1999
1,388
0
0
WoD.BeyondUnreal.com
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.