Event Trigger Labels
In RPG Maker, you have events on the map that can be triggered when the player is either standing on top of them or in front of them. When a player wishes to trigger an event, they press the “action” button, which by default is the Z or Enter key. When an event is triggered, they will execute the entire list of commands.
However, what happens if you want to allow a player to interact with an event in different ways? For example, if a player walks up to an event and talks to it normally, they might just have friendly conversation.
On the other hand, if a player walks up to an event and presses the A key, this might issue a challenge to the event to a mini-game, and the event will ask you if you’re sure you want to do this.
This plugin allows you to separate an event’s list of commands into different sections. Depending on how the event is triggered, a different section would run, allowing you to create unique behaviors when the player interacts with an event.
Plugin: download here (right-click, save as)
This is for MV only. For the Ace version, click here.
Download ths plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_EventTriggerLabel plugin.
Once it is in your list of plugins, turn the plugin on.
If you prefer watching a video instead of reading the usage, you can take a look at Echo607’s tutorial
By default, all commands on the current event page are executed from top to
bottom when the event is run.
We can create sections of the page that will only be run when the trigger
label condition is met.
Button Trigger Labels
These trigger labels require certain buttons to be pressed.
For example, you might have a set of commands that only run when the “a” key is pressed, and another set of commands that are only run when the “b” key is pressed.
To create a button trigger label, create a “Label” event command and write
Where the BUTTON is the name of a button that should be pressed.
Here is an example of an event that can be triggered with 4 different buttons.
Depending on what plugins you’re using for buttons, it may be different. For example, if you’re not using any custom keyboard or input scripts, you don’t really have much choice beyond these buttons:
ok - Z key, Enter key escape - X key, Esc key control - left control, right contorl shift - left shift, right shift alt pageup - Q key pagedown - W key
These apply to Yanfly’s keyboard config plugin as well.
So for example, if you want the event in front of you to be triggered when you press the X key (which usually goes to the menu), you can write
Which would intercept the escape button press and trigger the event instead of opening the menu.
If you’re using a full keyboard plugin such as ZE – Key Mapper, you would then have access to the entire keyboard!
Please look at the instructions for your input plugin on what buttons are available. I have also provided a plugin parameter that allows you to show “debug” information, which displays the name of the button that’s being pressed. You will use this for your labels.