ID:1876180
 
(See the best response by Kaiochao.)


Problem description:

Is it possible to create a movment that player is dragged slowly to a mouse location untill its not on its location without any clicking.
I don't follow. Can you clarify that?
Sorry for my bad english. I want to know how to make a movment that when you move a mouse around the screen the character slowy walks to mouse location like its beeing dragged
Here's the general principle:

1) Setup a client/MouseMove() proc that keeps track of the turf that you're over, and the icon-x and icon-y params, in vars that it can use later. (Call ..() if any atoms use MouseMove().)

2) When your mob is in this dragging mode, have a loop that will make them step towards the target location.
Best response
In case you want the mouse button to be held for this, you'll need to be using mob.MouseDrag(), not client.MouseMove().

If you want the mouse movement to be detected when your mouse crosses atoms, you also need to override client.MouseEntered(), since MouseMove() is not called for that event.

Using icon-x and icon-y won't be positionally accurate when the object your mouse is over has pixel_x/y offsets or a translate transform. If you want pixel accurate mouse position detection, you have to parse the screen_loc parameter, which can be a pain, as it takes the form of "x:px,y:py" and sometimes "map_id:x:px,y:py". Then of course you'd convert those screen coordinates to world coordinates.

I really wish MouseMove() were implemented in a more useful way.