What is a script with such a boring name for?
Did you ever happen to use a parallel common event? It will run all across the maps. But alas, it will restart once you transfer to a new map. And thus, if you don't want that to happen, you would need heavy eventing.
Spoiler: Click to see demonstration of the problem
The first photo shows the common event I made.
Second photo is how it reached to the third message on it's execution.
Third photo shows what happens once the player transfers to another map, while the event still works.
Well, that won't happen anymore with this script

. In the same example, the third image would show the forth message of the common event, if my script were activated.
This script works only with common events!!!
So, why do the common events restart?
What I see of it, it is because their interpreter is assigned to class instance variable, which is erased once you transfer to another map. In my script, the interpreters are stored in global array, which is also added to the save file.
What it is that interpreter anyway?
The interpreter is class in the RPG Maker, that reads and interpret events code, and execute it. Which is why it is so important to be preserved when the player transfers to another map, if we don't want the common event to restart its execution.
You don't want all common events to have global interpreter?
There are settings. You can fill an array with the id's of the common events you want to have global interpreter, or set all to work with it (which I am not sure how much that will affect the productivity).
Here is the script:
Spoiler: Click to see the code
And here is the header, together with the terms of use:
Spoiler: Click to see the script's header
Author:GGZiron
Script Name: Global Interpreters
Term of use: Free both for comercial and non comercial use. Credit me if you are going to use it. Do not share directly on other forums. Give link instead. Optionally, you can send me link to check your finished game, if my script is used on it.
Version 1.0. Date of release: 22 May 2018
Version 1.1 Date: 26 May 2018
Changelog:
Added additional aliases for more compability. Also fixed one part of my
code that I did not liked.
If I notice something wrong, will try to fix it. You can report bugs too. Cannot promise to fix, but ll try.
本贴来自国际rpgmaker官方论坛作者:GGZiron处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/global-interpreters-for-common-events.95564/