How can I make the light of a spotlight in this case turn off for a very brief moment and then turn it back on?
You could turn it off with the function BlinkLight, then turn it on again in Update (light script):
var blinkTime: float = 0;
function BlinkLight(time: float){
blinkTime = time; // set off timer...
light.enabled = false; // and turn light off
}
function Update(){
if (turnOffTime >= 0){ // if off timer active...
turnOffTime -= Time.deltaTime; // decrement it
if (turnOffTime < 0){ // if off time elapsed...
light.enabled = true; // turn light on again
}
}
}