• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Essentials Tutorial] Making new Triggers

Triggers allow us to make self contained code, or procs as ruby refers to them, and hook them up so they can be called at a later time. There are two main types in the Essentials code that are worth editing: Events and HandlerHashs. They are set up differently and have different uses, but both can be considered triggers.

Events are better when you have many procs that are all interested in one event, as Events will call each proc in turn to allow it to make its changes or observations. You may have already used it if you ever made an encounter modifier, or even when you use the shiny switch.
Meanwhile, HandlerHashs are better when you have many different effects but they are all dependent on a specific symbol. You'll have already used it if you ever defined your own item effect, hidden move handler, or even a multiple form.

Events
Spoiler:

HandlerHashs
Spoiler:
 
Last edited:
Back
Top