Repeat Until/Do While code

Although we don’t have a Repeat Until/Do While block, people have found ways of doing this manually :smiley:

This way involves putting code in an ability and it will keep on calling itself while a condition is true:

(This will repeat setting its color to purple while ValueB = 1. Alternatively you can change the condition to a Not Equals for Repeat Until conditions.)

You could also use a Repeat Forever which continually checks if something meets a condition and stops when it doesn’t. Credits to AwesomeCilantro for this!

However, you won’t be able to add more code to this rule though, or it won’t run.

A while ago, I made a project including these two examples too:


I knew I couldn’t be the first to come up with the first method. Hehe.


Ooh yeah, I’ve used this method before to make my force-close project last year:

Thanks for making this topic - it’s a really great technique to know of for sure. :D


Oooh yes it did use to crash the app! I have been able to use it recently, I think they had fixed that up


What’s interesting to me about this project is that when you run it multiple times, each time it will be more and more prone to crashing. It’s as if the CPU decides to dedicate more RAM to the app because it noticed an overload in a previous session of the app… intriguing. :o


34 posts were split to a new topic: Repeat Until / Wait Until block request

Separated this workaround from the feature request, so that it is more visible for Hopscotch Team

Moving discussion related to merging!

Moving discussion related to merging!

you can’t exit hopscotch: panik
you realize that you have this project: kalm
you realize you have a good device: panik



@Yuanyuan this could be a cool block, and would help a lot.

1 Like

yeah, @yuanyuan, i’d love this to be a feature.

1 Like