In Scratch, there is a boolean expression called "touching" and it can be used on one sprite to detect when it hits another sprite. But what if I want to detect when a sprite hits objects (such as multiple lines) drawn by pen within a single sprite.

This is my project that entails such scenario: https://scratch.mit.edu/projects/521887078

Here's also a figure of the project:

The yellow ball moves toward the green ball. Each time mouse is clicked on screen, a blue line is created by the diamond sprite. It is straightforward to make the yellow ball realize when it hits the diamond. But I want the yellow ball to realize when it hits the blue lines that are created by the diamond sprite. How can I achieve this goal?

I would appreciate if someone can help me with this.

1 Answer 1


Not sure that you can do "when touching a pen mark", but you can use "touching a color" as a condition, so perhaps if the sprite is touching the blue color?

  • That would do the job. Thanks a lot!
    – Hamed
    Commented Apr 28, 2021 at 5:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .