RandomX
Arithmetics
5.1 OC
int
int
value1
Range start
int
value2
Range end
Yields a random value from value1 to value2. It does not matter, which limit is greater or less.
SetXDir(RandomX(-20,+20));
Sets horizontal speed of the object to a random value between -20 and +20.
Message("Daniel has %d bread rolls!", RandomX(42,23));
Returns the number of Daniel's random bread rolls. This may be a value from 23 to 42.
Random
flgr2002-01