• 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] Small Bug with utilizing Shields Down, need help with what the problem is

  • 10
    Posts
    3
    Years
    • Seen Jun 13, 2022
    I'm trying to make it so another Pokemon that's not Minior use Shields down (Specifically Golurk but that's not relevant). Since my game will not use Minior at all anyway, I thought I could just replace the Shields down script of Minior with Golurk. This is all fine and dandy however, Minior has like 13 different forms while I only plan to use 2 for my Golurk (The base form and the 'core' form). I'm not a big coder but it was pretty easy for me to do, I just replaced any Instance of Minior using shields down with Golurk and changed the form value of 7(below 7 being meteor while above is core from what I understand) with 1 since there were only two forms for Golurk, 0 and 1. And this works fine, works perfectly like Shields down in battle in fact. Except with the caveat that when the battle starts it'll say "Shields down deactivated!" "Shields down deactivated!" Which is annoying. I'm not a big scripter, but I have a feeling that the reason this is is because I changed the value from 7 to 1 and that messed with something in the code. It works completely fine except for that, and it's purely visual so while annoying, it isn't broken. I'm just wondering what I can do to fix it, here's the code I used for Shields down:
    Code:
       if isSpecies?(:GOLURK) && self.ability == :SHIELDSDOWN
          if @hp>@totalhp/2   # Turn into Meteor form
            newForm = (@form>=1) ? @form-1 : @form
            if @form!=newForm
              @battle.pbShowAbilitySplash(self,true)
              @battle.pbHideAbilitySplash(self)
              pbChangeForm(newForm,_INTL("{1} deactivated!",abilityName))
            elsif !endOfRound
              @battle.pbDisplay(_INTL("{1} deactivated!",abilityName))
            end
          elsif @form<1   # Turn into Core form
            @battle.pbShowAbilitySplash(self,true)
            @battle.pbHideAbilitySplash(self)
            pbChangeForm(@form+1,_INTL("{1} activated!",abilityName))
          end
        end
    Sorry if this is stupid, but id be glad if anyone can help me out! I also never tested Shieldsdown with Minior first, so I don't know if this is just a problem with Shieldsdown in general or if its something I did. If it's just something with Shieldsdown in genera,l do tell me and I am sorry in advance!
     
    Back
    Top