set their positions, but these tries don't work
That is probably because you use 'world' coordinates. While you need 'relative' coordinates.
So first you find the X/Y pixels the dragged one moved compared to last tick.
Say dragged one's name = drag
2 instance variables. dx and dy. Their expressions are drag.dx and drag.dy.
2 instance variables. prex and prey. Their expressions are drag.prex and drag.prey.
Every tick
______ set (drag) dx to drag.x - drag.prex <---------- calculate difference
______ set (drag) dy to drag.y - drag.prey
______ set (drag) prex to drag.x <---------- update to use for the next tick
______ set (drag) prey to drag.y
Now, dx and dy hold the distance drag moved compared to the previous tick.
So ..
On dragging
_____ set any object's position to x= object.x + drag.dx ... y= object.y + drag.y
Thanks 99Instances2Go
Sorry, but this is a little confusing for me.
I have a main Sprite (that I think you named as "drag") with the drag 'n drop behavior so I need to create these 4 variables in this sprite and in the event "on dragging" I will associate all the other objects (or a family) that I need that follow the main sprite. Is it right?