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

Trouble with Grunts/Rivals/Rematches

20
Posts
5
Years
  • Age 31
  • Seen Jun 30, 2023
Hi, I've been having some trouble with getting battles to work where the trainer has the same name as a previous or later battle. The best example is the one causing me the most trouble right now. This is how I've defined the trainer type:

Spoiler:


This is how I defined the first battle with a Grunt, so far this one seems to be working:

Spoiler:


And this is how I defined the one that's giving me trouble:

Spoiler:


And also how the second Grunt is defined in the battle event:

Spoiler:


When I got to battle this second Grunt in the game I get asked to define a new trainer named TEAMSKY_M,Grunt,1 but I tried doing that and the game asked me to do it again the next time I tried the battle. If anyone could help me figure out what I'm doing wrong I'd be very grateful.
 

SpartaLazor

Doofus Lunarius
184
Posts
8
Years
The way you have it, "Grunt,1" is what's causing the issue. The line that starts the battle searches for the trainer named 'Grunt,1' which doesn't exist as the trainers PBS would still interpret an alternate battle as "Grunt."

What you need to do is set it up like below, where the number of the trainer battle is defined later in the code, bolded here:

pbTrainerBattle(:TEAMSKY_M,"Grunt",_I("How did I lose?!"),false,1,false,0)
 
Back
Top