LucasSchachtMusic
Member
[game maker 8]
Hey guys!
I wanted to know, how to check a "collision" with the cursor.
I'm making a simple drag & Drop function and started like that:
If mouse left button is clicked, then move the object to mouse_x and mouse_y. Yeah, but right now it doesn't matter, where I click, and the object will immediately be placed at mouse_x and mouse_y.
How can I tell GM8 that the object is only supposed to go to mouse x & y, when the object was actually clicked on?
I want to do it in code, because the normal step even is only running IF it's not being dragged. Everything works so far. I just don't know how to check the mouse "collision".
Thanks in advance!
Hey guys!
I wanted to know, how to check a "collision" with the cursor.
I'm making a simple drag & Drop function and started like that:
If mouse left button is clicked, then move the object to mouse_x and mouse_y. Yeah, but right now it doesn't matter, where I click, and the object will immediately be placed at mouse_x and mouse_y.
How can I tell GM8 that the object is only supposed to go to mouse x & y, when the object was actually clicked on?
I want to do it in code, because the normal step even is only running IF it's not being dragged. Everything works so far. I just don't know how to check the mouse "collision".
Thanks in advance!