PLEASE HELP MEEEEEE!!!
Hi everyone - I am a noob. Just thought I’d get that out of the way. Ok, I am making a game and I am trying to make a day/night cycle thing. To do that, I’m going to need like a time variable, which starts off at 1, and gets bigger by 1 every second. Like I kind of counter thing. So, to make that, I first tried this:
var time : int = 0;
function Update() {
time = (time + 1);
}
But of course, this just went up by 1 every frame. So, I though if I put in a WaitForSeconds command, it would work fine, like this:
var time : int = 0;
function Update() {
time = (time + 1);
yield WaitForSeconds (1);
}
But it didn’t work, and I have no idea why. Does anyone know why this isn’t working?
Thank you, and may the almighty Lord Notch bless you. ![]()