ST_NumerialS
Member!
- Joined
- Aug 13, 2003
- Messages
- 36
- Reaction score
- 0
- Location
- uhh, jeese. thats a good quest
- Website
- www.network54.com
How do I get a true random number?
First off, to point out to those that tell me "Use math - random number" I'm well aware of that. Thats why I titled this "true randoms."
I had an idea that I have players click on their main base to start the game, and then the amount of game time that went by is saved as a variable, and then the variable is multiplied by the interger I want to be a random number, and then when its less than 1 its multiplied by a number ,and when its greater than 14 its divided. But thats a very clumisly way to do this, and its not working properly as I'm getting numbers like 3098 and 987 and -0.24 and -605.
The reason I need this, is because in my card game, I want it to be so that each time you play the game, you get difference cards. Because while in the game its completely random based off the first number, its all based on the first number. So every time you play the game you'll get the same numbers. But if you change the first number, and ONLY the first, all the rest of the numbers will be different. I thought that I need something that is different evertime you play the game. Such as time of day, but you can't call into windows API for time of day (Unless you know how, please tell me) so I figured there's only two things. Thats the player's names, and the time of day you select your main base (as it can be different for evertime because its a "real" variable that goes down to the hundreths of a second.)
But I don't know how to incorperate my new random number with my first one staying inside the parameters of any number between 1 and 14.
All help is appreciated. Thankyou.
First off, to point out to those that tell me "Use math - random number" I'm well aware of that. Thats why I titled this "true randoms."
I had an idea that I have players click on their main base to start the game, and then the amount of game time that went by is saved as a variable, and then the variable is multiplied by the interger I want to be a random number, and then when its less than 1 its multiplied by a number ,and when its greater than 14 its divided. But thats a very clumisly way to do this, and its not working properly as I'm getting numbers like 3098 and 987 and -0.24 and -605.
The reason I need this, is because in my card game, I want it to be so that each time you play the game, you get difference cards. Because while in the game its completely random based off the first number, its all based on the first number. So every time you play the game you'll get the same numbers. But if you change the first number, and ONLY the first, all the rest of the numbers will be different. I thought that I need something that is different evertime you play the game. Such as time of day, but you can't call into windows API for time of day (Unless you know how, please tell me) so I figured there's only two things. Thats the player's names, and the time of day you select your main base (as it can be different for evertime because its a "real" variable that goes down to the hundreths of a second.)
But I don't know how to incorperate my new random number with my first one staying inside the parameters of any number between 1 and 14.
All help is appreciated. Thankyou.