Using Trigger labels to Respond to any Key Items

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

UsingKeyItemEventTriggers7

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

  1. You wanted the event to respond to any key item, and
  2. 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!

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax