I've looked around at various examples but haven't found something related to the problem I have.
For a chasing enemy in a platform game, I simply have it so that every 0.05 seconds:
If X position of enemy is greater than player X position, set Enemy X position as Enemy X position -1.
(and the opposite for when the enemy is on the other side of the player)
This works fine, but I don't know what to do when it comes to the enemy being stopped by a wall in the level. Walls in my game are backdrop objects, so I added *enemy is not overlapping a backdrop* to the above events, which does make the enemy stop at the wall, but then they can no longer move the other way as they are permanently stuck 1 pixel into the wall and can no longer move because of the event.
Any easy solution to this, or should I do a different method entirely for calculating x position of a chasing enemy?