No Revisions Have Been Made To This Page
Can you suggest an edit for this page? Click Here
GML Code Example
|val||The seed to set.|
To generate a random number GameMaker: Studio starts with a
random seed number. With this function you can set that seed to a
known value and so "force" the outcome of all random events
afterwards to be the same every time the program is run. For
example, this function can be used in conjunction with random_get_seed to create
procedurally generated content and save the results without having
huge savegames (you save the seed only, no need for anything else).
Should you need truly random results for everything, you should be
using the randomize()
NOTE: While this seed will give consistent results on each target platform, results may vary between platforms due to the different way each target works.