Action: Random(variable, min, max)

Related Actions: let, add, sub, mul, div, mod
See also: FKiSS, Events, Actions

random(variable, min, max)

First defined in: FKiSS3
The random action sets the value of variable to a random number in the range of min to max, inclusive. For example, random(X, 1, 100) randomizes a number that can be 1, 100, or any number between.

variable

variable must a variable name.

min

min may be number or a variable.

max

max may be number or a variable.

Example:

;@ random(X, 1, 100)    ; Create a random number from 1 to 100 and store it in X.
;@ random(R, Low, High) ; Create a random number in the range from Low to Hight and store it in R.