We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I would like to know how to exclude values in a variable when it takes values in a random () function. For example my variable y takes values randomly between 20 and 780 or y = (random (20,780)) However I do not want the variable y takes values between 300 and 400. Basically I want a function that prohibits y to take value between 300 and 400 but the rest yes. In addition I also search a function to initialize the program at the beginning when I press my mouse with a simple click. Indeed when I click on run, the program starts on a page 1 and when I finished my program, the program shows me on page 2. So on the page 2 when I click with my mouse, it starts again like at the beginning. If it's possible of course.
Thank you.
Answers
Thank you very much, it works on my program. I prefer the solution 2 with : while ((y = (int) random(20, 780)) >= 300 & y < 400);
And for reset it works also :)
continued here (why?!). closing this.
https://forum.processing.org/two/discussion/14898/how-to-choose-at-least-4-images