Reducing light range?

How can I reduce the range of a light over time?

It is fairly simple, just a lerp actually.

var lerpTime : float;
private var i : float = 0;

function Update () {

    light.range = Mathf.Lerp(maxRange,0, i/lerpTime);
    //You can use different settings to get a smoothed effect, this is linear.
    //Use lerp if you know how long, but not how fast.

    //light.range = Mathf.Lerp(light.range, 0, Time.deltaTime);
    //This will start smooth out near the end.

   //light.range -= Time.deltaTime * someFactor;
   //This will dim the light until it is out if you know how fast, but not how
   //you plan on dimming the light.

    i+= Time.deltaTime;


See this page for all the other ways to Lerp

You can use the animation editor and have it slowly decrease.