turf
DblClick()
for(var/obj/bigball/K in world)
if(K.Gowner == usr)
walk_towards(K,src,0)
if(get_step(K,src) > 1)
K.overlays += new/obj/ball
Problem description:
but the obj dont change when it reaches the turf the usr dblclicked.
some idea on how can i make the code?
i want the code to change the icon of the obj when it reached the turf.
Thanks
That is probably the simplest way to do it. Knowing the masters here like Garthor, though, there is a 99.9% chance that there is a better way to do it, and they will not hesitate to post here after myself. Anyways, this modification just uses while(), so that it checks that so long as the bigball is 1 or more tiles away from the turf, it will walk_towards() it. Once the distance is less than 1 (meaning it is on top), it changes the icon to whatever.dmi.