• 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.

[Eventing Question] Giving a trainer multiple teams

5
Posts
2
Years
    • Seen Oct 20, 2023
    Hello, I have been trying to give this trainer two teams. Both are defined in the PBS but even when I set the variable to 1, I still get his first team. Does anyone have an example they can show me? I would really appreciate it.
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Hello, I have been trying to give this trainer two teams. Both are defined in the PBS but even when I set the variable to 1, I still get his first team. Does anyone have an example they can show me? I would really appreciate it.

    Hey there,
    What version of Essentials do you use?

    In v18, the function pbTrainerBattle has the followig signature:
    Code:
    def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
                        doubleBattle=false, trainerPartyID=0, canLose=false, outcomeVar=1)
    which means that the third argument of the function is "endSpeech", thus, the dialogue at the end of the battle.
    The fourth argument controls whether it's a single or double battle, and then you have the index of the party (this is what you want).

    So, if you want to use the first team, use this:
    Code:
    pbTrainerBattle(:YOUNGSTER, "Ben")
    and for the second team:
    Code:
    pbTrainerBattle(:YOUNGSTER, "Ben", nil, false, 1)
     
    5
    Posts
    2
    Years
    • Seen Oct 20, 2023
    Thank you, this helped and I was able to figure out! I really appreciate it :)
     
    Back
    Top