I have an enemy that follows the player if its between 32 and 160 pixels left from the player, and explodes if its near it.
They work fine, but as I expanded the level, the moment the player.X value is greater than 1000, the enemy AI stops working: they neither walk or explode no matter what I do, until I move back to x=999. This problem happened in different layouts.