- 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
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