Wootius
Glah
- 300
- Posts
- 11
- Years
- Seen May 31, 2022
A hopefully simple question. I have an ability, BALLOONS(Balloons!!) on a alternate form of Pikachu that currently mimics the effect of the Air balloon item. Switching forms works fine. However, I want it to take three hits to ground this Pikachu after which its abillity will change to GROUNDED until swapped back in and out.
So I added added an accessor, attr_accessor(:ballons=hit=counter) with equal signs due to censorship, to the PokeBattle_Pokemon to count these hits. However, when I try to set this to any value I get a undefined method error.
Here's the error in full
and the code that causes it
As you can see, I try to set the hit counter for the Pikachu that just switched in to 0 and run into an undefined method error. Thank you for any help given!
So I added added an accessor, attr_accessor(:ballons=hit=counter) with equal signs due to censorship, to the PokeBattle_Pokemon to count these hits. However, when I try to set this to any value I get a undefined method error.
Here's the error in full
Spoiler:
Code:
---------------------------
Pokemon Rebalanced: Pastel Red
---------------------------
Exception: NoMethodError
Message: undefined method `ballon****counter=' for #<PokeBattle_Battler:0xb3deba0>
PokeBattle_Battler:773:in `pbAbilitiesOnSwitchIn'
PokeBattle_Battle:1739:in `pbOnActiveAll'
PokeBattle_Battle:1738:in `each'
PokeBattle_Battle:1738:in `pbOnActiveAll'
PokeBattle_Battle:2294:in `pbStartBattleCore'
PokeBattle_Battle:2133:in `pbStartBattle'
PokemonField:1016:in `pbWildBattle'
PokemonField:1015:in `pbSceneStandby'
PokemonField:1017:in `pbWildBattle'
PokemonField:1014:in `pbBattleAnimation'
This exception was logged in
C:\Users\Laureola\Saved Games/Pokemon Rebalanced_ Pastel Red/errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
and the code that causes it
Spoiler:
Code:
if isConst?(ability,PBAbilities,:BALLOONS) && onactive
self.ballon****counter = 0
@battle.pbDisplay(_INTL("{1}'s balloons lifted it high up!",pbThis))
end
As you can see, I try to set the hit counter for the Pikachu that just switched in to 0 and run into an undefined method error. Thank you for any help given!