Create tails when dragging a sprite

I would like to create a wiring application where when dragging a point (sprite) it could create a tail like painting in a piece of paper. This is probably something very basic but I cannot find how to do it.

untitled script pic (14)

Thank you very much! I am going to try this :slight_smile:

If you're making a wiring diagram you probably don't want to follow the mouse making a tail; you want to have a straight line between the starting point and the mouse and then stamp it when you let go.

This isn't perfect, but here's a thrown-together project to show what I mean:

This is very close! I will play around to try to make it with perpendicular segments. Thanks a lot for your help again!

Daniel

I made it so that you can draw a line from one point to another. I also fixed the size problem, and the sprite will hide if you are not currently drawing a line. (note: you can stretch a costume using the stretch block with the desired percentages) Thanks to @bh for the original project

Awesome!
Is it okay if I use this code with credit in one of my projects?

But you really want to restrict it to horizontal and vertical lines, don't you? If it's a wiring diagram?

Sure!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.