User Tools

Site Tools


modding:function:seededrandom

Discuss this page on this pages TalkPage

seededRandom

See seededRandom at Xelerus

Syntax (seededRandom number expression [number])
Arguments number: the seed of the random number generator
expression: can be a number or a list.
[number]: The number you want to a random number between them the second must be greater than the first number.
Returns expression: If the expression argument is a list it returns a random element of the list, if the expression is a number then returns a number between the expression number and optional number.
Category 0.99, random
Description If the expression argument is a list it returns a random element of the list depending on the seed, if the expression is a number then returns a number between the expression number and optional number, always depending on the seed.

Example

(seededRandom 1 1 10)

Returns 2

(seededRandom 1 '(a b c d e f g h i l))

Returns b Return to Functions list

modding/function/seededrandom.txt · Last modified: 2014/12/27 04:40 by 127.0.0.1