Here’s a portion of the code I’m applying to a simple sphere. I want to know how to reset the variable blinkSecond, if possible. If it isn’t possible, I’d like to know if there’s a way to loop this so that each time I call upon blinkSecond I can have the circle blink. I can post the rest of the code if it is needed to clarify what I’m asking. Thanks a lot!
var blinkSecond : int = 3;
function secondBlink ()
{
if (onlyCircle == true)
{
while (blinkSecond > 0)
{
blinkSecond--;
yield WaitForSeconds(0.5);
renderer.enabled = false;
yield WaitForSeconds(0.5);
renderer.enabled = true;
}
yield WaitForSeconds(.5); // wait another sec.
}
}