[Event] Creating key item triggered events

● ARCHIVED · READ-ONLY
Started by Tsukihime 1 posts View original ↗
  1. 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:


    key_item_trigger3.JPG


    key_item_trigger1.JPG


    key_item_trigger2.JPG