• 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!
  • Dawn, Gloria, Juliana, or Summer - 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] Displaying an option on the Party screen if Pokemon selected is one of several certain species

  • 29
    Posts
    14
    Years
    • Seen Jan 28, 2024
    I'm trying to make a new command when viewing the party, and it depends on the species whether or not this option appears. This is what I've got:

    Code:
    ...
          cmdMail=-1
          cmdEvent=-1
          # Build the commands
          commands[cmdSummary=commands.length]=_INTL("Summary")
    ...
          if pkmn.species==PBSpecies::CHARIZARD || PBSpecies::BLASTOISE || PBSpecies::VENUSAUR ||
                           PBSpecies::TYPHLOSION || PBSpecies::FERALIGATR || PBSpecies::MEGANIUM ||
                           PBSpecies::BLAZIKEN || PBSpecies::SWAMPERT || PBSpecies::SCEPTILE ||
                           PBSpecies::INFERNAPE || PBSpecies::EMPOLEON || PBSpecies::TORTERRA ||
                           PBSpecies::EMBOAR || PBSpecies::SAMUROTT || PBSpecies::SERPERIOR ||
                           PBSpecies::DELPHOX || PBSpecies::GRENINJA || PBSpecies::CHESNAUGHT ||
                           PBSpecies::INCINEROAR || PBSpecies::PRIMARINA || PBSpecies::DECIDUEYE ||
                           PBSpecies::RAICHU || PBSpecies::FLAREON || PBSpecies::VAPOREON ||
                           PBSpecies::JOLTEON || PBSpecies::UMBREON || PBSpecies::ESPEON ||
                           PBSpecies::GLACEON || PBSpecies::LEAFEON || PBSpecies::SYLVEON
           commands[cmdEvent=commands.length]=_INTL("Event")
    ...
          elsif cmdEvent>=0 && command==cmdEvent
            command=pbDisplay(_INTL("This is a fully evolved starter Pokemon! Good job!"))
            end

    However, the 'Event' option also appears on Salamence, so I know it is not working as intended. I'm using Essentials v15 if that helps.
     
    I fixed it. I needed to use the "isConst?(pkmn.species,PBSpecies,:<Pokemon species name>) function for each Pokemon.
     
    Back
    Top