Or you could add the scrolling extension and make the sprite not move and… BOOM. It looks like he is walking. (Or what he is doing in your game.) But if you’re ACTALLY moving, do what @mmurray1019 said.
I don’t think there is an easy way, but if you get the cameras location then you might be able to see how far away the player is on the x axis by getting the difference between the cameras X and the players X, then checking if it is above or below 80 and -80. (160 is the screen size so 80 is half.)
This was written quickly, if you need a better explanation just ask.