Breaking out of a loop

Hi! I am having a hard time figuring this one out. I want to have many mice running around. I want to “catch” a mouse by clicking on it. When I click on it, I want it to stop running on the path immediately and move over to the box.

I have a feeling I should be using “break out of loop” but I can’t get it to work. I am using true/false right now, but it doesn’t remove the mouse from the path immediately plus it seems like a lot of code ( I want to have many mice). Any advice? Using coblocks only. Here is sample: Delightex Edu :: mouse loop

I tested your code, this is good! All you have to do is add the “Stop transition of” block underneath the block that says, “Set variable mouse to false”. Your code should look like this:

1 Like

Thanks! I didn’t know about the “stop transition”block!