ID:166277
 
Well basicly I made a system where you drag an item to any location to move it there, if you drag it to your own location it goes to your contents, but for some reason it deletes if its dragged onto your turf
But if dragged onto your icon it works fine,
i would think you couild code something o check if there was a usr on that square, but i dont know any coding that could do it.
In response to VolksBlade
I wanted it only to work for the player who did it, so I even tried checking if it was the X Y and Z of the player, same result
In response to Delamore
sorry i dont know how to help you
Well, if you did have a semi-success in the beginning, you could of posted some code, in Code Problems. But, go ahead and post it here, and we can see where you went wrong.
In response to XxDohxX
Well here it is its kinda messy tho

obj/drop_me
icon='drag.dmi'
icon_state="item"
MouseDrag()
mouse_drag_pointer=src.icon
mouse_drag_pointer=src.icon_state
MouseDrop(src_location,over_location)
mouse_drag_pointer=null
if(src in oview(1))
src.loc=src_location
if(src.loc==usr.loc)
src.loc=usr.contents
..()
else
..()
else
..()

verb
Drop()
src.Move(usr.loc)
..()
In response to Delamore
Let's just clarify something:


MouseDrop(over_object,src_location,over_location)

Args:
over_object: the object under the mouse pointer
src_location: the turf or stat panel from where the src object was dragged
over_location: the turf or stat panel containing the object under the mouse pointer


You would want to set the new location to over_location.

Hope that helps some.

-XxDohxX
In response to XxDohxX
Could you explain more?
I'm kinda a newbie,
In response to Delamore
I took that from the reference. Basically, src
_location is the location that the item was ORIGINALLY at, not the new location. So when you set the location, you want to set it to the new location. Understand? If not, ask some questions and I'll gladly answer?

-XxDohxX
In response to XxDohxX
Well I'm gonna sleep now but thanks a ton for the help its always nice to know theres helpfull people,
Gonna repair the code tomorow, till then nite nite.