the problem is the following:
My main character moves around the map, and when enemies are closer to him, they chase him, however I want to have a sort of "safe zone", in my case, a river in my map.
Is there anyway I could to to prevent them from coming into that zone, so they stop just in front of it?
It would be like a solid, which is only solid for some objects, so they collide, and can't move through it.
I've tried to create a sprite, and when an enemy collides with this sprite, they stop following me, but then, when I'm out of my safe zone, they won't chase me any more.