A downloadable Scripts for Windows

Download NowName your own price

this allows you to have multiple random number generators who's states can be changed separately.. A fantastic use would be for keeping multiplayer games in sync. Just call rand* functions the same number of times on all clients where you need random to stay in sync.

list of functions below:

returns a random number generator with given seed... if no seed is provided it will be set to random_get_seed()

rand(generator, x);
returns a random number x from the given generator.

randf(generator, x);
returns a random number x from the given generator with 2 decimal places.

rand_choose(generator, *args);
returns a random value from the args using the given generator.

rand_range(generator, x1, x2);
returns a random value between or equal to x1 and x2 using the given generator.

rand_set_seed(generator, seed);
sets the seed for the given generator.

returns the seed from which this generator started.

returns the current seed for the given generator.

rand_seek_state(generator, n);
increment the seed of given generator n number of times.

return the amount of times called since seed was set.


Download NowName your own price

Click download now to get access to the following files:

multiple_random_states.gml 1 kB
if you pay $3.50 USD or more