What I want to do is to create a new planet in my system for example every 10 seconds and that it starts to move and also prints a \"hello\" . At the end I want that the 8 p
You can use the modulo % operator along with the frameCount variable inside the draw()
function to do something every X frames.
Here is an example program that draws little circles most frames, but draws a big circle every 60 frames:
void setup() {
size(500, 500);
background(0);
}
void draw() {
ellipse(mouseX, mouseY, 10, 10);
if (frameCount % 60 == 0) {
ellipse(mouseX, mouseY, 50, 50);
}
}