Well can someone help me with my code?.. It’s a Script for a Scop… Im having the problem of “Semicolon at the end”, also “Expecting ,) Found =”
public var FOVIN : float=35;
public var FOVSpeed :float=5;
public var Aim : boolean=false;
public var DeffFOV : float;
public var CAM : GameObject;
function Start () {
DeffFOV=CAM.camera.fieldOfView;
}
function Update (){
if(Input.GetMouseButtonDown(1))
{
Aim=true;
}
if(Input.GetMouseButtonUp(1))
{
Aim=false;
}
if (Aim)
{
CAM.camera.fieldOfView=Mathf.Lerp(CAM.camera.fieldOfView, FOVIN ,FOVSpeed = Time.deltaTime);
}
if (Aim)
{
CAM.camera.fieldOfView=Mathf.Lerp(CAM.camera.fieldOfView,DeffFOV,FOVSpeed=Time.deltaTime);
}
}