I'm a complete beginner and I'm probably overlooking something very simple here, but I'd be really grateful for some assistance.
I'm making a basic platformer in which the lead character is followed by an assistant. I've currently got the assistant to follow by having the system compare their x coordinates and set the action of the follower to left/right if he's too far away from the player or stop if he's within 20.
It works perfectly except that if you keep walking while he is following you, his sprite 'judders' very noticeably while he walks. I adjusted it so that the game only checked the relative positions every few seconds (thinking that maybe the problem was that it was constantly checking and restarting his walk cycle) but it made no difference. Where am I going wrong?
Thanks in advance for all help.