C
Capptianm
Guest
you know the way you would move windows on your computer screen? how you hold left click on something and that thing moves with the mouse on the point the mouse clicked?
I want to move the mouse like this, and I thought I have a way to do this, but I got a few problems
when you introduce multiple instances of the same object, then you get an error, since variables xxx and yyy aren't actually set in objects that are not left-clicked.
Changing the step event to left down creates a new problem, as now the object only moves when the mouse is on the object, which is very annoying to deal with.
can anyone help me out here?
I want to move the mouse like this, and I thought I have a way to do this, but I got a few problems
Code:
//Left Pressed
//set point
xxx = mouse_x - x
yyy = mouse_y - y
//Step
//moving the object
if (mouse_check_button(mb_left))
{
x = mouse_x - xxx
y = mouse_y - yyy
}
Changing the step event to left down creates a new problem, as now the object only moves when the mouse is on the object, which is very annoying to deal with.
can anyone help me out here?