| 07-29-2004, 02:18 AM | #1 |
I noticed that in the function "Random Integer Between X and X", The random number is predecided in the World Editor, Thus not being honestly random. I want to spawn a jumble of units in a random point each different game, but random integer does not help. I tried something like this, but random integer made it choose the same one each time: Code:
Events Time Elapsed is 0.04 Seconds Conditions Actions If RandIntSpawn--------My Random Integer Variable------ is equal to 1, then run trigger Spawn 1 If RandIntSpawn is equal to 2, then run Spawn 2 Etc, Etc Can anyone guide me to an honestly random way of doing this? |
| 07-29-2004, 03:21 AM | #2 |
its cuz every time u tell to do random number it pick one number if u did it again it would be a different number plus its a 50/50 chance do this every 2 second set random int to 1 through 2 ![]() so evey 2 second it will b a new number but since its a 50/50 chance u might get the same number 2 times in a row or so |
| 07-29-2004, 03:25 AM | #3 |
heh :) This issue should be added to one of the FAQs, as not only is it a pretty embarrassing issue, but it's also a pretty common issue, i've actually seen 4 threads like this just lately. WC3 is fully capable at producing random numbers. The reason why you don't get honest randomity, is that .... you're using a feature of WE's to allways use the same random numbers each time you "test" your map using the test-map feature. Disable that feature in WE configures to get your "honest" randomity :). Note that if you run your map in WC3, the normal way, it will always be random. ~Cubasis |
| 07-29-2004, 03:34 AM | #4 | |
Quote:
<_< Thanks a lot! Does that also work with "Random Point In Location"? |
