You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CryoEagle edited this page Jan 14, 2019
·
11 revisions
random
Returns a random number from 0 to n
Syntax:
random(n)
Argument
Description
double n
The upper range from which the random number will be selected
Returns:double
Description:
This function will return a number between a range of 0 and your chosen upper range.
NOTE:This function will return the same value every time the game is run due to the fact that SimplexRpgEngine generates the same initial random seed every time to make debugging code a far easier task. To avoid this behavior, use randomize() at the start of your game.
Example:
doubledirection=random(360);
This code will return random direction from angle 0° to angle 360°.