Using Trigger labels to Respond to any Key Items
I have added a new label to Key Item Trigger Labels appropriately called the “Any Key Item Trigger Label”. The purpose of this label is to allow you to create events that will respond when you use any key item on it.
Previously, you could set triggers on specific key item usage. However, what happens if you had a very specific scenario where
- You wanted the event to respond to any key item, and
- You wanted to know what the key item is
Having triggers on specific key items wouldn’t work.
One solution is to simply create trigger labels for every possible item that you could throw at it. If you had 10 items, then you would create 10 labels. If you had 100 items, then you would create 100 labels.
However, that’s not a real solution.
Instead, with this new “any keyitem” label, you can simply create a trigger label called
keyitem?(ANY)
And the script would automatically figure out that you want the event to respond to any key item used on it.
Furthermore, because the ID of the key item used is stored in a variable (if you look in the configuration you’ll see a variable), you can retrieve the actual item used just by checking the variable!