obj/MouseDrag()if(istype(usr,/mob/Witch))mouse_drag_pointer=icon(src.icon,src.icon_state,src.dir)
obj/New()
..()
mouse_drag_pointer=icon(src.icon,src.icon_state,src.dir)
obj/MouseDrop(o_o,s_l,o_l)
if(usr.orbobjectdrag== 1)
if(usr.Freeze)
usr<<"Your frozen, you can't use magic"
return
if(isturf(o_l))
if(usr.Energy<=0)
usr<<"You don't have the energy to do this"
return
if(usr.MagicBound||WorldMagicBound)
usr<<"Your Magic doesn't seem to work, it's bound!"
return
if(usr.Selforb)usr<<"You can't do this while orbing."
else
walk_towards(src,o_l)
view(6)<<OrbTk
var/obj/A = new(locate(src.x,src.y,src.z))
A.layer = 1000
A.icon = 'magicgood2.dmi'
flick("orbobj",A)
sleep (3)
overlays = null
usr.Exposing_Magic()
view(6)<<OrbTk
view(6)<< "[usr] Scorves [src]"
usr:Energy -= 5
del A
return
else usr<<"You can't just drop this into your inventory!"
Problem description:
ok so I'm not too well versed in this so if you just want to send my a link to a page that can help me that would be great too! Basically, the verb works fine the issue is that currently, the icon i have 'flick((orbobj")' just places the icon over the obj(Like a chair or something) what I WANT it to do is the orb icon almost replaces the shape of the chair icon when you click drag it instead of just plopping on top of it. Hoping that makes sense, thanks!
Just for future reference, creating and deleting objects is taxing and should be avoided whenever possible. In this case it seems like just a visual effect, so it might be better to use an overlay or other method:
Also, looks like a potential typo here:
The : path operator is kind of esoteric and allows you to attempt to access a variable that isn't strictly defined for the preceding object. It can be useful but most of the time, better to stick with the . operator. That will catch errors for you at compile time, whereas the : operator will allow you to write anything and then only give an error during runtime.