Hi,
1. I have a Repeat loop and the loop contains an IF statement. If the 'IF' condition is not true, I want to skip all the subsequent statements until the end of the loop and start the next iteration of the loop. Is it possible in Scratch?
2. Also, is it possible exit a repeat loop altogether if a certain condition is true, without executing the remaining lines of code.
Thanks.
Offline
1) Put all the stuff you want to skip in the IF block.
2) Yes, by using the repeat until instead of regular repeat. Have it say
repeat until <<(counter) < (value)> or <other condition>>
You will need a counter variable.
Offline
[Removed by the Redundancy Police]
xD
Last edited by MoreGamesNow (2012-01-16 07:35:04)
Offline