Thank you! it works indeed
I added the โwhileโ loop that I needed for my assignment to it
while (x < stop) {
stroke(0);
if (x == 40 || x == 60) {
stroke(255);
}
line(x, 60, x, 80);
x += stap;
}
}
and got the desired effect I was looking for :).
Sorry if the question is stupid, but could you tell me why I cannot put the
line(x, 60, x, 80);
x += stap;
right under the x<stop equation, and before the if (x== 40 โฆ)
like:
while (x < stop ) {
stroke(0);
line(x, 60, x, 80);
x += stap;
if (x == 40 || x == 60) {
stroke(255);
}
}
}
it just seems like it is in the same position either way (as in being inside the while loop) but just getting added later. Or does it need to do the equation/counting first before it should draw?