ID:264265
 
obj
jutsus
punch
icon='skillcards.dmi'
icon_state="punch"
Click()
usr.Punch()

MouseDrag()
mouse_drag_pointer=src.icon_state


Why won't it change the icon in MouseDrag()? Or at least DRAG the skill ?

:/ Is it because the skill is in a grid ?
I believe I've had this problem before, as well, and submitted it as a bug. It's either some stupid mistake, or some random bug, because no one ever replied to me.
Andre-g1 wrote:
> obj
> jutsus
> punch
> icon='skillcards.dmi'
> icon_state="punch"
> Click()
> usr.Punch()
>
> MouseDrag()
> mouse_drag_pointer=src.icon_state
>
>

Why won't it change the icon in MouseDrag()? Or at least DRAG the skill ?

:/ Is it because the skill is in a grid ?

To drag an item from one location to another, you have to override the MouseDrop proc of the receiving atom, or client.MouseDrop if there's skin controls like grids involved. By default, dragging and dropping items does precisely nothing, so you must define what happens on the areas that it can be done to.

Also, mouse_drag_pointer is supposed to be an icon, and not only have you assigned a string to it, you've only attempted to set it during the drag operation. More than likely, this is the sort of thing you're after:

obj/jutsus/punch
mouse_drag_pointer = 'someicon.dmi'


Or possibly even:

obj/jutsus/punch
New()
..()
src.mouse_drag_pointer = src.icon
In response to Mobius Evalon
I fixed it with a way similar to your last code snippet.

I did however, keep the "src.icon_state" bit.

mouse_drag_pointer can be set to a icon state. Like the reference points out;

"This variable may also be assigned to any of the other built-in mouse pointers, or a custom icon or icon state."