When object is dragged

A feature I’d like to see in Hopscotch is: A when is dragged magenta block

I’d use it for this type of project: any that involves a character being dragged

Here are some examples of Hopscotch code that could be improved if we had this: Here’s an example: You drag an object, and you want another object to react to the dragging, like a magnet.

Here is an example design I’ve made:

I’ve seen something similar in another programming languages, it looks like this: N/A

7 Likes

isn’t this like when pressed?

4 Likes

Oh yeah like what @nobody said

3 Likes

or “when is tapped”

4 Likes

Just use ”when (self) is pressed”

6 Likes

I second that

4 Likes

Not helpful bc like the others, theres a rule for that

3 Likes

You could just do this by doing When Self is Pressed: Set Position to Last Touch X / Last Touch Y.

4 Likes

Wait |When ((self) is pressed)] works
Then make the object draggable

3 Likes

WhenGameStarts

2 Likes

Wait, how would you tell if smth is being dragged? Lol you have to simulate that w/ math tho

5 Likes

If it’s being dragged then it’s being pressed

9 Likes

Oh yeah when is pressed works I wasn’t thinking about that. @Leaders close, I think.

1 Like