float lastTimeCheck; float timeInterval; color chest = color(250,200,0); color back = color(250,200,0); color legs = color(255,200,0); color base = color(250,200,0); void timer(){ lastTimeCheck = millis(); timeInterval = 2000; //2 sec } //void strokeChange(){ //if (millis() > lastTimeCheck + timeInterval) //{ //lastTimeCheck = millis(); //stroke(random(0,255),random(0,255),random(0,255)); //} //} void update(){ if (millis() < timeInterval){ fill(250,200,0); } if (millis() > lastTimeCheck + timeInterval){ lastTimeCheck = millis(); legs = color(random(0,255),random(0,255),random(0,255)); chest = color(random(0,255),random(0,255),random(0,255)); back = color(random(0,255),random(0,255),random(0,255)); //if (lastTimeCheck > millis()+timeInterval){ legs = color(base);} } }