设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
搜索附件  
同能RPG制作大师 › 附件中心 › 同能RM技术讨论区 › RPG Maker VA 讨论区 › Global Interpreters for common events.: Global Interpreters for common events.-1.png

Global Interpreters for common events.: Global Interpreters for common events.-1.png

 

Global Interpreters for common events.:
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 problemThe 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
                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/
Global Interpreters for common events.: Global Interpreters for common events.-1.png
简体中文
繁體中文
English(英语)
日本語(日语)
Deutsch(德语)
Русский язык(俄语)
بالعربية(阿拉伯语)
Türkçe(土耳其语)
Português(葡萄牙语)
ภาษาไทย(泰国语)
한어(朝鲜语/韩语)
Français(法语)
关闭

幸运抽奖

社区每日抽奖来袭,快来试试你是欧皇还是非酋~

立即查看

Loading...

QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

GMT+8, 2026-10-5 05:24 , Processed in 0.092386 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部