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

Activated switch only while battling

50
Posts
10
Years
    • Seen Apr 20, 2014
    Hi, I wonder if someone knows how to activate a switch when a battle starts and desactivate it when it finish. When I say battle i mean any kind of battle (wild or trainer).
    Actually, I just want to know in which part of the scripts I should activate and desactivate the switch so every time the battle starts it switches on and when the battle finishes, it switches off.

    Thanks all.
     
    401
    Posts
    19
    Years
    • Age 29
    • Seen Dec 4, 2016
    The core method of PokeBattle_Battle is a good place to put a switch. Search for: "def pbStartBattleCore(canlose)". Turn the switch at the beginning of the method and turn it off before "return pbEndOfBattle(canlose)" (unless you want it to turn off after the victory scene which in that case, you will have to turn it off in pbEndOfBattle(canlose) ). Hope that helps.
     
    Back
    Top