How to make drag and drop

howtos

#1

This is a tutorial one how to make drag and drop because it got 75% of 8 voters.
I will also make a timer tutorial though.

On the item which will be dragged add this:

When character is pressed

Set position to last touch x and last touch y

Feedback please!


How to create a drawing pad
#2

Oh great tutorial, I can't believe the code for a drag and drop is actually 3 lines of code.
Btw I voted and was waiting for your tutorial.


#3

Actually 2. The when and the set position.


#4

Oh yeah, the when character could be changed.
:slightly_smiling: Nice thinking


#5

No, the when has to be character is pressed.


#6

Oh right but then it makes 3 lines of code. No?


#7

Also, You Can Draw In Hopscotch If You Add A Leave A Trail, Then Remove The Move Forward In The Leave A Trail, Then Add The Set Position Block Into The Leave A Trail, Then Add A New Rule Saying When The Play Button Is Tapped, Then Add The Same Set Position In That Rule, And Boom. You Did It.


#8

I don't get it. The rule and the set position. The rule is 1 line, the set position is 1 line. 1 + 1 is 2 not 3.


#9

Thanks now I know how to drag and drop! @NDSDNS