Fenix Manual
Fenix Manual
Command Reference
Math Commands

Abs
Acos
Advance
Asin
Atan
Cos
Fget_Angle
Fget_Dist
Near_Angle
Pow
Rand
Rand_Seed
Sin
Sqrt
Tan
Xadvance

Rand
Last Modified: May 29, 2005 21:05PM
(Any)
Description

INT RAND ( INT minimum, INT maximum )
It returns a random number between the limits specified like parameter, including the limits

PARAMETERS:
INT minimum: Minimum whole number to obtain
INT maximum: Maximum whole number to obtain

DESCRIPTION:
This function generates a random number. Each call to this function generates a different number, although always it will be within the specified rank.

It can use rand_seed to select a determined seed, from which the random numbers are generated. At begin of the program, a random seed is selected (based on the hour of the day).

NOTES:

Using Rand_Seed, it is possible to obtain a series of numbers with randomness aspect but in such a way that it is always the same one, so that it is important if you want that the game shows a predictable behavior. For example, some games allow to save "demos" of games simply storing the pulsations of key that the player is doing during a normal game,and reproducing soon making them use of the same game of functions used during the normal game. For a game that uses this technique, the use of the function Rand can cause that some small behavior varies during the reproduction of demo of unpredictable form, making the reproduction non-viable of demo.

User Contributed Notes
Rand
Add Notes About Notes
There are no user contributed notes for this page.
Last updated: Mon, 30 May 2005 - 10:33:03

Manual © 2005 By Gary Moncrieff(Dazzy), Notes belong to their respective posters