Advertiser Content

Pokemon Battle is not working.

Started by ~Angel~ October 18th, 2012 2:13 PM
  • 1141 views
  • 4 replies

~Angel~

Lead developer for Pokémon Millennium

Age 22
Male
United States Of America.
Seen June 22nd, 2018
Posted August 20th, 2017
281 posts
9.8 Years
Ok so I have repeadiatly been trying to get this to work :/ And I still can't get it. Down below in the attachments is what I have been trying to get to work. I don't know if the event is set up incorrectly or now but can someone help correct this? I used to set these up but have not set one up in like a month or two :/ (Sorry I had to put it as a attachment :/)
Event encounters - Pokémon Essentials Wiki.png

~Angel~

Lead developer for Pokémon Millennium

Age 22
Male
United States Of America.
Seen June 22nd, 2018
Posted August 20th, 2017
281 posts
9.8 Years
Honestly I see nothing wrong, but what is the full code of the wild battle, I can't see it all... unless the pbWildBattle has more than 4 args, I can't see anything wrong.
Everything here is followed from the pokemon essentials Wiki (Other than a few things) but the full code is:
pbWildBattle(PBSpecies::SUICUNE,45,1,false,true)

Maruno

Lead Dev of Pokémon Essentials

England
Seen 2 Days Ago
Posted 2 Days Ago
5,200 posts
11.9 Years
You haven't said how it doesn't work.

What I noticed about your event is that you have the pbWildBattle code in a Conditional Branch, and you've put the Control Self Switch in the "else" part of it. That's usually not how wild battles are set up - the wiki page doesn't say to put the battle itself in a Conditional Branch (although I'll admit there's no clear example).

The pbWildBattle should be in a Script event command by itself, and always followed by the Control Self Switch command. If you want to do different things depending on the outcome of the battle, then you make use of the fact that the outcome is stored in Global Variable 1 (according to your code) by creating Conditional Branches after the battle and doing whatever. That is, you leave the battle itself alone, and just play with the part after it.

I'm not saying you can't do it your way. Your event will run the battle as normal, and then turn the Self Switch on only if the player lost the battle. That behaviour is unexpected, and can lead to infinite captured Suicune. If you put the Control Self Switch in the first part of the Conditional Branch, then it will be done if the player wins/flees the battle (by any method), while leaving Suicune free for rebattling if you lose against it.

Your code also says you can't flee from the battle, and you'll be fully healed after losing instead of scurrying back to the last checkpoint. To me, that's also unexpected for a battle like this (what special force is preventing the player from fleeing/will heal the player after they lose?), but that's up to you.
Go to the Essentials Docs Wiki

Essentials Docs Wiki

Follow me on Twitter: @maruno42


~Angel~

Lead developer for Pokémon Millennium

Age 22
Male
United States Of America.
Seen June 22nd, 2018
Posted August 20th, 2017
281 posts
9.8 Years
You haven't said how it doesn't work.

What I noticed about your event is that you have the pbWildBattle code in a Conditional Branch, and you've put the Control Self Switch in the "else" part of it. That's usually not how wild battles are set up - the wiki page doesn't say to put the battle itself in a Conditional Branch (although I'll admit there's no clear example).

The pbWildBattle should be in a Script event command by itself, and always followed by the Control Self Switch command. If you want to do different things depending on the outcome of the battle, then you make use of the fact that the outcome is stored in Global Variable 1 (according to your code) by creating Conditional Branches after the battle and doing whatever. That is, you leave the battle itself alone, and just play with the part after it.

I'm not saying you can't do it your way. Your event will run the battle as normal, and then turn the Self Switch on only if the player lost the battle. That behaviour is unexpected, and can lead to infinite captured Suicune. If you put the Control Self Switch in the first part of the Conditional Branch, then it will be done if the player wins/flees the battle (by any method), while leaving Suicune free for rebattling if you lose against it.

Your code also says you can't flee from the battle, and you'll be fully healed after losing instead of scurrying back to the last checkpoint. To me, that's also unexpected for a battle like this (what special force is preventing the player from fleeing/will heal the player after they lose?), but that's up to you.
OH! I see it know. That's my problem. (Possibly) The problem is it won't go into the battle. It just either removes the event (Or when I moded it) it would keep the event and not do a control self switch.

It's doing that problem to two of my events. I remembered I had one before like that and it worked before but know it will not.
Advertiser Content