• 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!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Scripting Question] Editing ItemHandler from different script.

  • 1
    Posts
    8
    Years
    • Seen Dec 28, 2023
    Hey Everyone,

    I'd like to make an existing item handler behave differently from another script. (So not editing where it initially is created)

    I know it's possible to add an item handler with :
    Code:
    ItemHandlers::<SITUATION>.add (or addif)
    however if an Item handler for an item+situation already exists and you add it again it gets ignored (presumably because it gets pushed to the array, and the first handler already returns true/false)

    I'd like to know if it's possible to either remove an existing handler before adding a new one, or to somehow edit one.

    Any help would be greatly apreciated!
     
    Back
    Top