Dynamic Branching v1.0
JakeMSG
Introduction
With this plugin, you're capable of giving the player the choice to "branch" out, by pressing customizable keys on their keyboard, to go to specific labels.
Thus, you're able to "branch dynamically" during event processing, instead of being restricted to branch/label jump only at predetermined positions in the event editor.
Features
- Use Labels to enable the game to wait for specific (customizable) key inputs from the player, before jumping to specified labels per each individual possible key (keys are specified by their ASCII code).
- The ability to also disable the above feature where needed.
- The ability to even "revert" a "jump", to essentially jump back to the initial jump's starting position (and even provide an offset for said starting position).
* There's also a Javascript function you can use for referencing a key directly by its (ASCII) keyCode instead of its keyName (which you'd normally have to set prior), in conjunction with any Input functions!
==== NEW!
- Made the MZ version!
- Unlike the MV version (which solely use the "Label" instruction), it solely uses the "Jump to Label" instruction. Otherwise, it works exactly the same.
- Keep in mind, if your "Jump to Label" is named exactly as another Label in the event page, priority will be taken by my plugin's new function for the "Jump to Label" instruction over its initial function. Best to avoid such function conflicts, just to keep things simple(-er).
How to Use
Download this plugin and paste it in the "/www/js/plugins" folder for MV (or just "js/plugins" folder for MZ), then enable it within the editor, as per usual.
I recommend also using a site, on the side, to check for the ASCII codes for your keys, such as
[this one].
Download
Terms and Credits
Use however you wish, wherever, credit me if you feel like it / give me a copy of your game if you feel generous
New Trick - Parallel Eventing capability (by sending key Input via Script Calls)
If you want to trigger the Jumps in an Event Page by using Parallel Eventing outside of said event page, you can do so by sending a key Input from script calls, like so:
- * Input._currentState[keyNameOrCode] = true;
复制代码- * {Wait In-Editor Instruction} = 4 Frames
复制代码- * Input._currentState[keyNameOrCode] = false;
复制代码- * ==== "keyNameOrCode" can be any keyName (much like all other Input function work), or even use my "aKey" new method
复制代码- * ==== The Wait needs to be > 1 frames (safe to use 4 frames), so that it can be detected during main Event processing
复制代码
This can also work using the javascript function I added with the Plugin to reference keys by their (ASCII) keyCodes!
本贴来自国际rpgmaker官方论坛作者:JakeMSG处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/dynamic-branching.180978/