ID:138901
 
Code:
mob
var/tmp
obj/shadow
step_size = 8
icon='players.dmi';icon_state="warrior"
New()
..()
spawn(5)
shadow=new
shadow.icon='players.dmi'; shadow.icon_state="shadow"
shadow.step_x=src.step_x
shadow.step_y=src.step_y
shadow.loc=loc
walk_to(shadow,src,0,0,0)


Problem description:
Not sure if this is just me or i'm not doing it correctly, I have a shadow and i want it to follow a player around, It kinda works but doesn't at the same time, It never actually stays under the player it stays about a tile away.

The goal for this is that i don't want the shadow to move with the player when jumping (Which adding it as an overlay does). The jumping system uses pixel_y offsets. If you can think of a better way to do this i would really appreciate it. Thanks

Also i thought that it might be the obj step size, i checked that too and the player and the mobs step size is the same.
Why not just move the shadow in the mobs Move() proc on a successful call?
In response to Jmurph (#2)
good idea
In response to Johan411 (#3)
Thank you, that worked. Just wondering tho is walk_to with the new pixel stuff bugged/glitched?