I have been going through and making a simple point and click game as my first project. I have 4 gameObjects currently in use, 3 of which have their code set and ready to go. The last one i’m trying to work with needs to stay up on the screen for 3 seconds then disappear then reappear randomly in a random position. I can get it to disappear (simple right?) but everytime i try to make it reappear for X amount of seconds then disappear again it just keeps flashing really fast. Like its being rendered really fast constantly. Please help!
What my code looks like:
var blinkingSphereTimer : float = 3.0;
var blinkingSphere : boolean = true;
function BlinkingSphere ()
{
if (blinkingSphere)
{
yield WaitForSeconds (blinkingSphereTimer);
renderer.enabled = false;
}
}