ID:271063
 
How would I drag a mob,obj or turf around that is NOT on my hud?
are you trying to make telenisis?
In response to Miran94
I guess you could say that, but with your mouse.

So, anyone know how?
Umm, whats the problem..? Just drag it with your mouse; left click the atom and while still holding down the left mouse button, move your mouse :P
To make it do something, override that atom's MouseDrag() proc.
In response to Masuko Shintaro
Masuko Shintaro wrote:
How would I drag a mob,obj or turf around that is NOT on my hud?

I just made this for you, and tested it, no bugs in it.

I made 2 different codes, one that lets the mob or obj move to the location of your mouse pointer while dragging. And one code that teleports the mob or obj to the location of your mouse pointer ( when you released your right mouse after holding the mob or obj )

Its up to you which one you need!


Number 1
    MouseDrag(atom/movable/Old,atom/New)
if(istype(Old))
Old.loc=locate(New.x,New.y,New.z)



Number 2
    MouseDrop(atom/movable/Old,atom/New)
if(istype(Old) && istype(New))
Old.loc=locate(New.x,New.y,New.z)


I hope that this is of any help to you.
In response to Rinaldo
Why are you using locate(Atom.x,Atom.y,Atom.z)</tt? O_o
Just use Atom.loc instead...

Also, forcing the 'loc' var to change like that is pretty bad since you're not calling any movement system procs. Use the atom/movable/Move().