We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am coding a program where I dress up a character, where you have options for 3 different features to choose from so for example, i have chosen eyes, skin color and hat. For my eyes I have 3 different eyes you can pick from. It cycles from one eye to the next using frame = (frame+1)%1260, frame starting at 0. I used this since the frame starts at 0, and i have 7 options to cycle from, cycling for 3 seconds each, so 1260 frames in total. (using framecount to keep track). What I need to do at this point is use booleans so that ONLY feature 1 will cycle until the user presses a key to pick from the options from feature1. once the user picks from feature 1, then feature 2 will start to cycle (feature 1 stays), then once feature 2 is chosen, feature 3 will start to cycle. (dont show the next feature until the previous one is chosen) I just cant figure out how to do that.
Answers
Study this until you understand how it works then apply that understanding to your own sketch.
i need to use booleans for this not loops :(
This should make your brain and eyes hurt. Only an deranged, insane person would do it this way. You really need to learn how to use loops.
Do not study this. It is awful. Try to understand why this code is so terrible, and then apply that understanding as motivation to learn all about arrays and loops.
yeah thank you! im actually just doing a comparison for a project lol, how would i get it to stop once i've pressed which options i've wanted?
First, understand what the above code is doing.
Second, remove the line that causes it to go back to the first row.
This will introduce a bug, as the above code assumes you are on the third row if you are not on the first or second row. Add additional checks to make sure you are on the third row to fix this.