Home › Forums › Problems and solutions in GDL › Object design › Can I refresh RND() ? › Reply To: Can I refresh RND() ?
November 11, 2019 at 09:45 #18392
RND returns the same sequence of random numbers in each run. The sequence is different for each placed object. This makes it possible to create randomized objects (eg. trees) that look the same on different 3d views (different sections, animated fly-through rendering).
It is possible to get the time using REQUEST(“DateTime”,…).
You can convert the returned string to a number with SPLIT.
Use that in a loop to get different number of random numbers in each run.
n = REQUEST ("DateTime", "%S", datetimestring) split(datetimestring, "%n", rndseed) for i = 1 to rndseed + 1 random = int(rnd(100)) next i text2 0,0, str(random, 1, 0)
Library Platform, Software Engineer