• 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!
  • 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] Need Help Coding Master Trainer system into game

  • 1
    Posts
    8
    Years
    • Seen Aug 22, 2019
    Hello, I have been trying to figure something out for days and have yet to find a solution either by myself or in the forums.

    I am trying to get the Master Trainer system from the Let's GO games to work in essentials, but I am having difficulties.

    The first hurdle is figuring out how to check for the same pokemon in the party. So far I have come up with using $Trainer.pokemonParty[0].species==PBSpecies::BLAZIKEN and doing it specifically for each Master Trainer, but that seems tedious, and I think it would be simpler if I could have a variable with a number for the kind of pokemon, and it checks if a pokemon in the party matches that number. Then I can change just the variable instead of 6 different scripts each time.

    The second, and biggest hurdle, is that I cannot for the life of me find a way to have the player choose their pokemon, Blaziken in this case, and then remove all other party members, storing in a "game_variables" until the battle it done so I can give them back.

    If anyone can help me with these problems, it would be greatly appreciated.
     
    It is funny how Thundga released a video on deleting Pokemon from the players party the same day you asked about removing Pokemon from your team.
    link: https://www.youtube.com/watch?v=nfRuA33Wt2I

    A concept you would mess around with is to use the for loop that Thundga uses on his first event to find the Pokemon of choice, this this case a Blaziken and store that Pokemon in a variable then remove the Blaziken from the party. Then make another variable to store the rest of $Trainer.pokemonparty, use the delete command to completely remove all the Pokemon from the players party, re-add the Blaziken to the players party by calling the first variable you made. At this point you should only have the Blaziken in your party for the 1v1 match, then finish the event win or lose to add the remaining Pokemon back to the party by calling the second variable.... Then clear both variables to prevent any form of Pokemon duplication later on.
     
    Last edited:
    Maybe using the FL Pokemon Selection Script will make it easier. You just had to modify it so that only Blaziken would be accepted.
     
    Back
    Top