| 03-11-2008, 11:48 PM | #1 |
Any reason my random numbers don't differ from game to game? And yes, "Use fixed random seed" is not ticked. I've tried multiple times in single player and a few on battle.net and the random numbers never differ. If it helps, all the random numbers that I want to be random are set at map init. |
| 03-12-2008, 12:36 AM | #2 | |
Quote:
I'm not sure if "Use fixed Random seed" is the thing i'm thinking of but there is some thing in the map editor you need to tick. Other then that maybe you should post your code, you might have a made a mistake that you missed. |
| 03-12-2008, 01:47 AM | #4 |
Odd... can you post the map? |
| 03-12-2008, 02:00 AM | #5 |
You're jumping to conclusions, it's most definitely not the random numbers if it's happening on BNet. Include messages that display the random number generated and you'll see for yourself. Make sure the regions you're referring to exist and are correctly defined for array indicies 1, 2, and 3. It's likely that if those are declared wrong, it would generate the behavior you've described. |
| 03-12-2008, 02:11 AM | #6 |
or you have the most amazing luck! If thats so, play the lottery! But let's say that It's not your luck that's causing this... "all the random numbers that I want to be random are set at map init." ^ | -could that be the problem... or maybe: "Zone2[TempInteger])", are you sure that there are 3 defined rects in there? |
| 03-12-2008, 02:31 AM | #7 |
I am 100% sure there are 3 defined rects for it (defined at map init too but the trigger is before this one). I had already tried displaying TempInteger and the co-ordinates of TempPoint and they were always the same. |
| 03-12-2008, 02:50 AM | #8 | |
Quote:
|
| 03-12-2008, 03:03 AM | #9 | |
Quote:
I bet he's just lucky XD. Also, set random numbers at the intialization but the key, try doing it using the event "Time - Elapsed game time is 0.10 seconds". |
| 03-12-2008, 06:20 AM | #11 | |
Quote:
|
| 03-12-2008, 06:23 AM | #12 |
I removed them out of there when I was testing time delays like Salbrismind suggested but they came after the "Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across Selection <gen> ". |
| 03-12-2008, 06:29 AM | #13 |
I sincerely apologize if I'm stealing the topic, but does (as an example) random number from 1 to 50 take as much or more memory than 1 to 5? Also, what about 50 to 100 and 1000 to 1050? Again, my apologies if this is stealing the topic. |
| 03-12-2008, 06:45 AM | #14 | |
Quote:
Numbers in JASS all use the same amount of space. The fact that the number "is random" doesn't change that. http://en.wikipedia.org/wiki/Integer...ter_science%29 http://en.wikipedia.org/wiki/Pseudo_...mber_generator |
| 03-12-2008, 06:47 AM | #15 |
Ok, so if I run Map Init (the trigger) at "Time - Elapsed game time is 0.01 seconds" rather than "Map initialization" while having my Zones initialized in a separate trigger at "Map initialization" then if my units are also created at "Map initialization" then they are indeed randomly placed. |
