• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
4
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

    • 1.png
      1.png
      3.5 KB · Views: 36
    • 2.png
      2.png
      45.9 KB · Views: 35
    277
    Posts
    15
    Years
  • 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:
    277
    Posts
    15
    Years
  • 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:
    1
    Posts
    6
    Years
    • Seen Mar 20, 2020
    Hello, I can't get PBSpecies.getName($Trainer.party[0].species) to work... I'm really rookie at programing, can you help me?
     

    Attachments

    • Error.png
      Error.png
      15.2 KB · Views: 15
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    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?
     

    #Not Important

    All hail the wishmaker
    910
    Posts
    4
    Years
  • I don't have a laptop to test it but I think this will work:

    Code:
    def WhoIsThatPokemon
      Kernel.pbMessage("The first pokemon in your party is... {1}!",PBSpecies.getName($Trainer.party[0].species))
    end
     
    Back
    Top