Key Item Trigger Labels
This script is an add-on for Event Trigger Labels. It allows you to assign key items as trigger labels, allowing you to use key items to trigger events. You can add multiple key item triggers to an event, each with their own set of responses.
By pressing a button of your choice, the player can bring up a key item selection window that will list all of the key items currently in the inventory. The player can then select a key item, and any events in front of the player that can be triggered by the item will execute.
Rather than creating static events that will ask you whether you wish to use a certain item, or simply check whether the item is in the inventory and proceed to run the appropriate logic, you can challenge the player to figure out when and where an item should be used.
In the script editor, place this script below Event Trigger Labels and above Main
Instead of treating your page as one list of commands, you should instead treat it as different sections of commands. Each section will have its own label, specified in a specific format.
To create a section, add a Label command and then write
Where the ID is the ID of the item that you want this trigger label to respond to.
To set up your items for use as key items, in the item tab of the database, create an item, set the item type to “Key Item”.
You can have it so that you will consume one key item when you successfully trigger an event.
Simply set the item’s consumable option to “Yes”. If you don’t want the item to be consumed, set it to “No”.
Any key Items
Sometimes you simply want the event to respond to a key item regardless what the key item is. You can use a special “ANY keyitem” trigger label which will be run if the event has no matching key item label for the key item you used.
To respond to any key item, use the trigger label