• 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] Name the first Pokémon in your team

  • 3
    Posts
    5
    Years
    • Seen Aug 6, 2019
    First of all, hello! I have just registered in the forums, but I usually visit it a lot :)

    I'm having an issue making a NPC that names the first Pokémon in your team (the specie)
    The script is the following (image 1)
    And I get this (260 because is Swampert) (image 2)
    If I use .name instead .species I got the nickname properly, but not the specie.

    I usually find solutions googleing but not this case :( any help?
     

    Attachments

    • [PokeCommunity.com] Name the first Pokémon in your team
      1.png
      3.5 KB · Views: 46
    • [PokeCommunity.com] Name the first Pokémon in your team
      2.png
      45.9 KB · Views: 43
    To my knowledge you would have to get the internal name of the Pokemon which there is not currently a method for.
    Try going to PokeBattle_Pokemon and take a look at what can be call and see if you can create a means to call the internal name.

    I was wrong, I just didn't think you could call it bc the wiki said it is something the player shouldn't see.
     
    Last edited:
    I was able to figure it out, here is what I have.

    Code:
    def pbWhosThatPokemon
      Kernel.pbMessage(_INTL("Your first Pokemon is " + PBSpecies.getName($Trainer.party[0].species) + "."))
    end

    Just have the event call pbWhosThatPokemon

    Edit: Darn, I was to late I didn't see Vendily beat me to it.
     
    Last edited:
    Hello, I can't get PBSpecies.getName($Trainer.party[0].species) to work... I'm really rookie at programing, can you help me?
     

    Attachments

    • [PokeCommunity.com] Name the first Pokémon in your team
      Error.png
      15.2 KB · Views: 17
    Hello, I can't get PBSpecies.getName($Trainer.party[0].species) to work... I'm really rookie at programing, can you help me?

    I'm confused by your syntax error. Is that one line of code? If not, maybe you can use extendtext so that you can fit it onto one line?
     
    Back
    Top