Let's say we have a monster that we want to pace backwards and forwards. How do we make it turn around after a certain distance and how do we make the sprite change from facing right to facing left and back again?
We will need left and right facing sprites, and we will place an invisible block each end where we want the monster to turn around.