You are reading a single comment by @Gordon and its replies.
Click here to read the full conversation.
-
I don't quite understand the first option. What would the variable do as far as exiting the loop
And far as the second one, would I make this a recursive function? I'm just making sure that the program can be reset essentially (without literally pressing the reset button).
Either way here's what I interpreted from your second option
Yes, blockly isn't great for that kind of thing - although it would be possible for someone to add a special block that would break out of an
every X seconds
block.For now though, I reckon you've got 2 options to do what you want:
every 5 second
loop going all the time, and use a variable with anif myVariable
block right inside theevery 5 second
loop. You can then stop things or start them by setting or clearing the variable.fiveSecs
, and in that function addif (myCondition) { wait 5 secs { call fiveSecs } }
- that's maybe the nicest...