Is there a plugin or a standard function for generating a Random number? ???
Random
Random (int max)
Returns a random number between 0 and MAX. This could be useful to do various effects in your game.
NOTE: The range returned is inclusive - ie. if you do Random(3); then it can return 0, 1, 2 or 3.
Example:
int ran=Random(2);
if (ran==0) NewRoom(1);
else if (ran==1) NewRoom(2);
else NewRoom(3);
will change the current room to room 1,2 or 3 depending on a random result.
Taken Directly From the MANUAL
RTFM!
QuoteRTFM!
Indeed. NEW RULE! All posts will be locked if the answer is easily found in the AGS manual. Thank you, buh-bye.