|
-
August 26th, 2009, 10:50 AM
#7
Re: SRAND Number Generation Help
 Originally Posted by TruthSpeaker
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|