ID:140610
 
Code:
    Shunpo
icon_state = ""
MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params)
var/icon/I = new(src.icon,src.icon_state)
mouse_drag_pointer = I
MouseDrop(over_object,src_location,over_location, src_control,over_control,params)
usr<<"test"
if(istype(over_object,/obj/HUDS/))
usr<<"testtrue"
for(var/obj/HUDS/J in over_object)
usr<<"testtrusdsae"


Problem description:

it knows what its being dragged onto, but i want it to add an overlay of its self to the hud. any help
Agrey123 wrote:
        MouseDrop(over_object=src,src_location,over_location, src_control,over_control,params)

if(over_control == /obj/HUDS/)


The reference on MouseDrop elaborates on the different arguments the proc takes.

over_control: The id of the skin control the object was dropped onto

If you compare the explanation on what over_control is with what you thought it would be, do you realize something?

Agrey123 wrote:
            if(over_control == /obj/HUDS/)

for(var/obj/HUDS/J in over_control)


You seem to have a serious misunderstanding between object type and object instance.

Edit:
I just saw the 'over_object=src' part.
That is something you might want to reconsider and reread on as well.
In response to Schnitzelnagler
    Shunpo
icon_state = ""
MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params)
var/icon/I = new(src.icon,src.icon_state)
mouse_drag_pointer = I
MouseDrop(over_object,src_location,over_location, src_control,over_control,params)
usr<<"test"
if(istype(over_object,/obj/HUDS/))
usr<<"testtrue"
for(var/obj/HUDS/J in over_object)
usr<<"testtrusdsae"


i got that to work , my real question was how do i add the overlays of the src to the /obj/HUDS it was dragged onto
In response to Agrey123
over_object.overlays += src
Agrey123 wrote:
MouseDrag(src_object,over_object,src_location,over_location,src_control,over_control,params)
> var/icon/I = new(src.icon,src.icon_state)
> mouse_drag_pointer = I


That kind of thing is supposed to go in New(), not MouseDrop(). It's an initialization of an object's var, which only needs to be done once (rather than every time it's dragged somewhere). Where are you getting the impression that it's needed over there? I've seen that a few times now. Copying from a bad demo?

Also, using an /icon object to do that isn't needed at all, because the mouse_*_pointer vars all support a plethora of data types to be used as the resulting appearance, or graphic (just like under/overlays do), including state names and atom/image references. So you can really just set an object's X pointer var to its own reference (or to its own icon_state to achieve almost an entirely identical result) in order to make that pointer icon look like the object.

The others covered the rest.