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

Properly scripting trainerbattle command

  • 124
    Posts
    9
    Years
    • Seen Apr 5, 2024
    I've been racking my brains on this one. I am trying to write a trainerbattle script and i want it to continue after I beat the trainer, but I just cant seem to make it continue.

    for example: trainerbattle(2, TRAINER_RED, 10, Red1_Intro, Red1_Outro)

    doesnt continue after I beat him, and when i step on the trigger again the script continues, which is not what i want to happen, i just want to continue the rest of the script after the battle, please someone help with this! Thanks!
     
    I've been racking my brains on this one. I am trying to write a trainerbattle script and i want it to continue after I beat the trainer, but I just cant seem to make it continue.

    for example: trainerbattle(2, TRAINER_RED, 10, Red1_Intro, Red1_Outro)

    doesnt continue after I beat him, and when i step on the trigger again the script continues, which is not what i want to happen, i just want to continue the rest of the script after the battle, please someone help with this! Thanks!

    If you look at the trainerbattle script macro, you can see that the types that continue the script take an additional pointer to a script, which will run after the trainer battle.
    There are also helper macros that you can use instead of the trainerbattle command.

    You could for example do:
    Code:
    trainerbattle_single(TRAINER_RED, Red1_Intro, Red1_Outro, Script_afterRed)
    Which would run the script "Script_afterRed" after winning the battle.
     
    I knew it, something told me thats what i needed to do. I wanted to continue the script NOT jump to another script. Thank you Anon, great as always.
     
    Back
    Top