ID:998303
 
Code:
Ability
parent_type = /obj
name = ""
icon = 'Skills.dmi'
icon_state = ""
MouseDrop(over_object,src_location,over_location,src_control,over_control,params)
world << "Object: [src]"
world << "Object Start Loc: [src_location]"
world << "Object Control: [src_control]"
world << "Dropped On: [over_object]"
world << "Dropped Loc: [over_location]"
world << "Dropped Control: [over_control]"
if(findtext("[over_control]", "bindingspane"))
var/bkey = "[winget(usr, over_control, "text")]"
bkey = lowertext("[bkey]"
usr.bind_key("[bkey]", src)
var/image/I = image(src.icon,"[src.icon_state]")
//var/icon/I = icon(src.icon,"[src.icon_state]")
world << "Created Image to Use: \icon[I]"
winset(usr, "[over_control]", "image = [I]")
world << "[bkey] Label Icon should change"


Problem description:

I'm trying to change the image of a label by dragging an ability to the label and its not working and I dont know why
You have to manualy set the image-mode aswell.
winset(player, "[window].[control]", "image-mode=[mode]; image=[image]")
Isnt it set to stretch by default?
In response to Shades12163
Not when there is no default image.
I just set it to stretch and no change?
In response to Shades12163
Funny. I had the same issue awhile back and setting the image-mode=stretch fixed it for me.
In response to Shades12163
Side note: I don't see where you close off winset(); there's no ) to end the call.
Accident in post, it isn't like that in the code sorry
Anyone else see anything wrong with this or have an idea why this isn't working?
Have you made the label a dropzone? Also I created a test environment and I got the label to change its image.

Ability
parent_type = /obj
name = "blob"
icon = 'grass.dmi'
icon_state = ""
MouseDrop(over_object,src_location,over_location,src_control,over_control,params)
winset(usr, "[over_control]", "image=[icon]")

mob
Login()
src.contents+=new /Ability
..()
Stat()
for(var/Ability/A in contents)
stat(A)


Apologies if this isn't what you wanted.

[Edit] Realized that this topic is 6 days old, oh well.
In response to Aries
You answer is still valid, as it wasn't solved. I would've replied had I realised I neglected to before.