MV Stopping Events when out of View (How to fix?)

I think the video explains it very well.


Everything works fine till 0:25.
The characters are running with perfect distance and the tree has a custom Movement animation.
But the second the event tiles get out of my view the game stops them (my theory) which destroys my illusion.

Is that normal? For performance maybe.
But is there a way to bypass this restriction?

Lots of love

Kong
RMMV has this default anti-lag measure where event autonomous movement are stopped outside certain range.
A way to bypass it is to turn the event into parallel and execute the command forcefully.
It's pretty crude and may cause an issue when overused or if your game has lots of complications. Otherwise, it should be okay.
1598451592422.png
Thanks for your reply!
I think with your tip I'll get it to work with the tree but it doesn't work with the children.
When you set a parallel event with a movement route it just does the first move every time (since the parallel event calls itself every frame) so right now I'm either misunderstanding something or the children are doomed ;__;
The lack of update is due to the isNearTheScreen function of Character_Base. Events only update when that condition is filled.

You can erase that condition by creating a plugin and putting inside the following code.

Code:
Game_CharacterBase.prototype.isNearTheScreen = function() {
    return true;
};

However, keep in mind that this was made to prevent lags when you have too many events. So, you may encounter lag if you create a miniplugin with this code. it's up to you.
Code:
Game_CharacterBase.prototype.isNearTheScreen = function() {
    return true;
};

Uff great knowledge, buddy!
Is there a easy way to ask that code block if a certain switch/plugin command is on so I can activate/deactivate it?
I wouldn't wanna ruin my whole games performance for this one scene but if I could alter it when needed I'd be ultra mega satisfied
In that case, if you want a switch, let's do something like this instead.

Code:
SCH_Game_CharacterBase_isNearTheScreen = Game_CharacterBase.prototype.isNearTheScreen;
Game_CharacterBase.prototype.isNearTheScreen = function() {
   var switch_id = 1; // Replace 1 by the id of the switch you want to use
   if ($gameSwitches.value(switch_id) == true) {
     return true;
   } else {
     return SCH_Game_CharacterBase_isNearTheScreen.call(this);
   }
}

Replace the 1 by the ID of the switch you want to use.
Sorry for answering late but the code is super gorgeous thanks very much!
The syntax is wrong though 😀

This works:

JavaScript:
SCH_Game_CharacterBase_isNearTheScreen = Game_CharacterBase.prototype.isNearTheScreen;

Game_CharacterBase.prototype.isNearTheScreen = function() {
   var switch_id = 10; // Replace 1 by the id of the switch you want to use
   if ($gameSwitches.value(switch_id) === true)
   {
     return true;
   }
   else
   {
     return SCH_Game_CharacterBase_isNearTheScreen.call(this);
   }
};

Thanks again mate <3

Original thread: https://forums.rpgmakerweb.com/threads/stopping-events-when-out-of-view-how-to-fix.126136/