random(n,m,k)
where variable k is assigned a number between the range of n to m.
So if you want to display monkeys on the screen 30% of the time.. you could do something like this:
if (newroom) {
random(0, 100, v100);
if (v100 < 30)
{
//load, draw, display, animate monkeys
}
}
- Nick