This is easily done. Put this in a .js file and add it as a plugin:
JavaScript:
Game_Event.prototype.isNearTheScreen = function() {
if(Game_Character.prototype.isNearTheScreen.call(this)) return true;
if(this.event().meta && this.event().meta.distantUpdate) return true;
if(this.page() && this.page().meta && this.page().meta.distantUpdate) return true;
return false;
};
Now you can add
<distantUpdate> to the event note box, and the NPC will move even while offscreen. If you have my SFG_Utils installed, it'll also work if you put
<distantUpdate> in a comment on any page – in that case, it'll only move while offscreen when that page is active.
But keep in mind the cautions noted above – generally, you don't want to do this for all your events, just a select few.
For example, I used it only on a single event: a character that runs around the entire town, but they're in an inaccessible place, so the only way to talk to them is to wait in one location and get in their way as they come around. If they didn't update while offscreen, you'd be waiting forever, unless you got lucky.