I have a question about timers in Processing. I want to make a square spawn after every second that passes. Would I use a for loop, an if statement, etc.?
You could just use the millis() function or the frameCount variable in an if statement.
millis()
frameCount
if
Something like this:
void draw(){ if(frameCount % 60 == 0){ //do something } }
More info can be found in the reference.
1.4m articles
1.4m replys
5 comments
57.0k users