Results 1 to 3 of 3
  1. #1
    Skaarj
    Join Date
    Apr 2011
    Location
    Baku, Azerbaijan
    Posts
    9

    Default FOV changes when I change weapon

    Hi guys.

    I needed a zoom for ironsight and found it on the internet:

    Code:
    simulated function StartZoom(UTPlayerController PC)
    {
    PC.StartZoom(10, ZoomedRate);
    }
    
    simulated function EndZoom(UTPlayerController PC)
    {
    PC.StartZoom(90, ZoomedRate);
    }
    
    exec function SetZoom()
    {
    local UTPlayerController PC;
    PC = UTPlayerController(Instigator.Controller);
    ConsoleCommand("onScope");
    StartZoom(PC);
    }
    
    exec function ResetZoom()
    {
    local UTPlayerController PC;
    PC = UTPlayerController(Instigator.Controller);
    ConsoleCommand("offScope");
    EndZoom(PC);
    }
    
    defaultproperties
    {
    ZoomedRate=90.000000
    }
    after that I pasted this code in my aaweapon.uc, when I change weapon in game, FOV changes.. where is my mistake?
    DefaultFOV is 90, it changes to approx 60...

  2. #2
    Redeemer
    Join Date
    Jul 2011
    Location
    London, UK
    Posts
    1,765

    Default

    When does it changes when you execute the zoom function, when you pick it up, or when time passes ?

  3. #3
    Skaarj
    Join Date
    Apr 2011
    Location
    Baku, Azerbaijan
    Posts
    9

    Default

    It changes as I pick or switch the weapon.

    Actually I partially fixed it by changing PC.SetFOV(PC.DefaultFOV); to PC.SetFOV(90); in UTWeapon.uc (I know it is not a professional solution, shame on me, yet a learner ) but next thing to fix is, when I switch from one weapon to another, FOV changes for a second..


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.