Advertiser Content

Trouble with Grunts/Rivals/Rematches

Started by CallMeClueless September 10th, 2018 1:41 PM
  • 119 views
  • 1 replies
Seen July 26th, 2019
Posted October 4th, 2018
8 posts
1.3 Years
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:
75,TEAMSKY_M,Team Sky,32,,,,Male,,


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

Spoiler:
TEAMSKY_M
Grunt
3
SHINX,9
POOCHYENA,9
FARFETCHD,16,,,,,,,M,,,,31,0,,true


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

Spoiler:
TEAMSKY_M
Grunt,1
2
WHISMUR,9
SHINX,9


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

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


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

A238

Male
Seen October 2nd, 2019
Posted April 21st, 2019
184 posts
4.2 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)
"The past can hold us back and yet still drive us forward."
Advertiser Content