ID:870836
 
(See the best response by Albro1.)
Code:
obj
Grass
icon = 'Grass.dmi'
mouse_drag_pointer = 'Grass.dmi'
MouseDrop(over_object,src_location,over_location,src_control,over_control)
if(over_location == null)
return
else
new /obj/Grass(locate(over_control))

TestCopy
icon = 'Test.dmi'


Problem description:
How would I make it replace the tile that I stop dragging the mouse? I want it to drag from Grass, then replace TestCopy with a new copy of Grass.

over_location is going to return a turf. You won't be replacing TestCopy - you'll be putting an object over it.

As for your error, you need to change locate(over_control) to locate(over_location).
So... change locate(over_control) to locate(over_location)?
I believe that is what I typed.
Still doesn't do anything.
Best response
Oh, sorry. My bad - just do new /obj/Grass(over_location).
Thanks. :D
No problem - please vote up the best response to help others!