Continue from this:
Timed loop, 10 second between
Which gave me a great answer on how I could make the loop on the outer for() each 10 seconds. (the Y)
Now I wish to make the inner loop, the X, so loop once each 1 second, and keep the outer loop (the ‘Y’) at 10000ms (10 seconds)
How can I do this?
You need to add
currentXin a similar way tocurrentY. Then, instead of incrementingcurrentYyou should incrementcurrentX. IfcurrentXis not less thanxnumHighthen set it back toxnumLowand incrementcurrentY.Basically you’re just doing the exact same thing as you did to put
yon a timer, just withxinstead.