Methods
-
random_angle()
-
Returns a random angle between -180 and 180.
Check out the third party documentation for a more in depth explanation.Code Equivalent:
game.rnd.angle()
-
random_boolean()
-
Randomly returns true or false.
Check out the third party documentation for a more in depth explanation.Code Equivalent:
game.rnd.pick([true, false])
-
random_pick(array)
-
Returns a random item from the list.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description array
list to pick from
Code Equivalent:
game.rnd.pick(array)
-
random_pick_weighted(array)
-
Returns a random item from the list, favoring items at the beginning.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description array
list to pick from
Code Equivalent:
game.rnd.weightedPick(array)
-
random_real()
-
Returns a random real number between 0 and 2^32.
Check out the third party documentation for a more in depth explanation.Code Equivalent:
game.rnd.real()
-
random_real_in_range(min, max)
-
Returns a random number between the given range, inclusive.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description min
Number the minimum value in the range
max
Number the maximum value in the range
Code Equivalent:
game.rnd.realInRange(min, max)
-
random_sign()
-
Returns a random sign to be used with multiplication. Returns -1 or +1.
Check out the third party documentation for a more in depth explanation.Code Equivalent:
game.rnd.sign()