• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    3
    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.
     
    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)
     
    Thank you, this helped and I was able to figure out! I really appreciate it :)
     
    Back
    Top