• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

[Error] Error while making a pokeball that turns wild pokemon shiny

  • 2
    Posts
    2
    Years
    • Seen Jun 21, 2022
    So I just bought rpgmaker XP with a little experience in VX ace, I wanted to fiddle with Pokemon essentials to make a fan game, and thought a pokeball that makes wild pokemon shiny after being caught would be pretty cool. The first thing I did was start doing exactly that, I made sprites for it, and put it in my items list, I made the on catch edit using this code


    Battle::PokeBallEffects::OnCatch.add(:SHIMMERBALL, proc { |ball, battle, pkmn|
    pkmn.makeShiny


    And I got the ball working in game, it's in my bag and can be used in battle, but after the pokemon is caught I get this error message

    Exception: NoMethodError
    Message: undefined method `makeShiny' for #<Pokemon NIDORANmA Lv.15>

    Backtrace:
    215:Battle_PokeBallEffects:202:in `block in <main>'
    035:Event_Handlers:227:in `trigger'
    215:Battle_PokeBallEffects:21:in `onCatch'
    210:Battle_CatchAndStoreMixin:185:in `pbThrowPokeBall'
    249:Item_BattleEffects:319:in `block in <main>'
    035:Event_Handlers:227:in `trigger'
    247:Item_Utilities:100:in `triggerUseInBattle'
    152:Battle_ActionUseItem:124:in `pbUsePokeBallInBattle'
    156:Battle_AttackPhase:83:in `block in pbAttackPhaseItems'
    156:Battle_AttackPhase:72:in `each'

    Any ideas on where I messed up? I am on v20 of pokemon essentials.

    Edit: (:S) is supposed to be colon S
     
    Figured it out. Don't know how to delete threads though, If anyone was curious
    pkmn.makeShiny
    needs to instead be
    pkmn.shiny = true
     
    Back
    Top