Rpg AI

hiya everyone, my npc problem is now fixed and now i was wondering if it was possible to have ai in a scrolling background, so far i tried having the enemy have normal system where it seekers the player on the screen but because i want it to scroll with the background is there anyway i can get it to scroll with the background and still get closer to the player if he comes close