Quite new to Processing and am trying to create a sort of create a character program where you chose options for them. I can get the options to cycle but am struggling to figure out the code to use so that if i press a key the option is selected.
Any help would be appreciated, I’ll post the code below
textAlign(CENTER,BOTTOM);
int time = frameCount;
time = frameCount%541;
boolean option1Chosen = false;
//Fur color
if(!keyPressed){
if(time<180){
text("Brown fur? Press any key to select.",width/2,height*8/10);
fill(90,70,10);}
else if(time>180 && time<360){
text("Yellow fur? Press any key to select.",width/2,height*8/10);
fill(255,255,0);}
else{
text("Or Blue fur? Press any key to select.",width/2,height*8/10);
fill(50,150,255);}
}
360 …
on a int should work, just to make sure pls print that variable time.
but from the posted code i can not see if that part is running inside draw?
so make sure the posted code is run / test-able with copy / paste into
processing IDE 3.5.3