じ☆ve冰风 发表于 7 天前

[Event] Creating key item triggered events

In games like chrono cross, you can press a key to open a window with a list of key items currently in your inventory.


In chrono cross, you can try arbitrary key items hoping that one of them will trigger an event.


RM also comes with a similar feature, except it is strictly through eventing, and you are unable to use a key item to


trigger an event.


There are two issues with this:


1. Even if you wrote a script to open the key item selection window, you'd have to figure out a way to actually trigger an event


2. When you've triggered an event, how would you determine which item you are using, and how can you make it easy to set up the event? Parallel process with a conditional branch? What if you have a hundred NPC's?


The solution is to use Event Trigger Labels.


This script comes with built-in functionality that allows you to setup an event to activate when a key item is used on an event.


Setting up the event is simple:


1: Create a label of the format

keyitem?(n)Where `n` is the ID of the keyitem that you want the event to respond to.
2: Add event commands as usual under the label.


The following image shows a sample event, with multiple triggers (both buttons and key items), as well as an example result in-game:



http://dl.dropbox.com/u/23043573/RPG%20Maker/Screenshot/key_item_trigger3.JPG




http://dl.dropbox.com/u/23043573/RPG%20Maker/Screenshot/key_item_trigger1.JPG




http://dl.dropbox.com/u/23043573/RPG%20Maker/Screenshot/key_item_trigger2.JPG



本贴来自国际rpgmaker官方论坛作者:Tsukihime处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/event-creating-key-item-triggered-events.6345/
页: [1]
查看完整版本: [Event] Creating key item triggered events