Quote Originally Posted by TruthSpeaker View Post
But when the other commands in main are using the same formula, gameTime should be taking the value from when it last was, so the countdown should keep going down.

I do not know if you people are helping and being funny or criticizing. If you want the whole code, say so. Do not act like this please.

The way I have the code set up, it is supposed to keep looping using the new gameTime each time in each pass and hit 0 eventually.
Well, from what you posted, I don't see additional calls to rand(), which you may not want anyway, but I demonstrated how with a single call, and a single number, exactly WHY you were alternating between two discrete values.

I can only base a guess on what you posted. I just followed the math, assuming your:
gameTime = randomTime - gameTime;
statement is what is being executed in your loop.

If you consider that criticism, fine.