So, i'm trying to make a script that basically does this:
When the game/scene starts, the light is very bright and gradually dims down to the desired intensity.
But, it doesn't work.
Whenever I try to make it "less than", it doesn't work, but when I do "greater than" it works, but stops at 4...
I'm really new to Unity, with some knowledge to Javascript, so... help?
#pragma strict
var lt : Light;
function Start ()
{
for (var i : int = 8; i < 0.5; i--)
{
lt.intensity -= 0.5;
yield WaitForSeconds(0.1);
}
}
↧