boulders and stickmen

How would you make it so that an object (e.g a boulder) is always was behind the main character (e.g a stickman) even when he loops around (wraps with attributes (self position x)) but not when something happens like he trips or falls down a hole, I've tried using constrain but it just catchs up to the stickman even faster, an suggestions?
Comments
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx