• 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!
  • Akari, Selene, Mint, Solana - 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.

Custom pokeball that activates a switch or sets a variable?

Telemetius

Tele*
  • 256
    Posts
    10
    Years
    The title is self explanatory, what I've been trying to do is setting a switch on (or a variable to 1) when a custom pokeball is thrown mid-battle:

    BallHandlers::ModifyCatchRate.add(:DEBUGBALL,proc{|ball,catchRate,battle,battler|
    $game_switches[112] = true
    next [catchRate,255].min
    })

    But it's not working. Can someone suggest me where i should put the:
    " $game_switches[112] = true "
    part, to make sure that it will be 100% set true?

    EDIT: I made sure that the new ball is recognized by the game so that's not the problem.
    EDIT2: Missing a C
     
    Last edited:
    What is the switch supposed to do?

    Simply put, the switch is supposed to show a message a moment before the battle ends:

    pbDisplayPaused(_INTL("bla bla bla, debugball thrown, nice work {1}.",$Trainer.name))
     
    Back
    Top