• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Catching Pokemon in Double Battles

Hey all! For a couple weeks, I've been at a roadblock in developing my game: catching Pokémon in double battles. I'm trying to make it like Colosseum/XD, where you can target either Pokemon with a PokeBall.

I have done tons of research and scoured the scripts, making modifications here and there. I'm just not competent enough yet at coding to figure this one out. Any help or ideas are really appreciated!

This is one of the last major hurdles for me before I can bang out the rest of the game. So I'm eager to figure it out! Thanks! :)

Here's a list of things I've tried or thought of.

PokeBattle_Battle
:
Under "def pbThrowPokeBall". Tried adding a condition for Double Battles with different targeting options using "pbIsOpposing?" but couldn't get a functioning script.
I removed the section saying "It's impossible to aim without being focused!" This works fine for me and is probably a necessary part of the solution.
Under "Command phase." There are choices given for your commands during your turn. Some of it has to do with Double Battles, but I can't figure out what it all means.
Under "Attack phase." There's a part that says "Player use item" which may be useful.

PItem_ItemEffects:
I removed the section saying "It's impossible to aim when there are two Pokemon."

PokeBattle_Battler:
Under "Find other battlers/sides in relation to this battler". Seems to define ways to refer to different Pokemon on the field. Maybe could be used in choosing the target of a Poke Ball?
Under "Move user and targets." There's a lot here about targeting Pokemon in battle, so there may be something here to alter. Can't figure out what.
 
I don't know this part of the script I didn't work on it yet so I can't tell you what else you should add or remove. Nonetheless, I think the easiest way to get help is to paste a part of the code which is not working and then we can help you find what the problem is. To paste code in the good form click on "use full editor" then on "insert a code block" or you can paste the code between [*CODE] and [*/CODE] without the *
 
Last edited:
Back
Top