I
itameio
Guest
I feel stupid for not realizing how to do this after all these years of using Game Maker and understanding more complex stuff. . .I need to create an object that can be dragged and dropped in the room by the mouse.
The only way I can do that is by having the object jump to mouse position after it is clicked and held. But that makes it jump based on the sprite center, and not be dragged by the point the cursor click on. Does that make any sense?
I tried measuring the distance between the position of object and position of cursor by decreasing the smallest of them from the largest and then have the position of the object increased/decreased based on that distance. But I found that's too complicated and may not even make sense. I've seen an example file for such a thing with old Game maker 8.0 which had very simple code, but I failed to find it online at this time.
So how can I make the object dragged while the point clicked on by the mouse as the center? to make it stop jumping?
The only way I can do that is by having the object jump to mouse position after it is clicked and held. But that makes it jump based on the sprite center, and not be dragged by the point the cursor click on. Does that make any sense?
I tried measuring the distance between the position of object and position of cursor by decreasing the smallest of them from the largest and then have the position of the object increased/decreased based on that distance. But I found that's too complicated and may not even make sense. I've seen an example file for such a thing with old Game maker 8.0 which had very simple code, but I failed to find it online at this time.
So how can I make the object dragged while the point clicked on by the mouse as the center? to make it stop jumping?