• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Eventing Question] Pokémon event battle

  • 7
    Posts
    6
    Years
    • Seen Dec 12, 2018
    Hello guys.
    I'm trying to make an event in which I battle a pokémon and the olny way to continue is catching it and, after caught, it increases a variable. If I lose/win or it escapes, I have to fight it again.

    I saw at pokémon essentials this text:
    pbWildBattle(PBSpecies::species,level,result,escape,canlose)
    "result" is a Global Variable number in which the outcome of the battle will be recorded (1=won, 2=lost, 3=run, 4=caught, 5=draw). "escape" is whether the player can flee from the battle (TRUE if not defined). "canlose" is whether the game continues even if the player loses the battle (with the player's party fully healed) (FALSE if not defined). These last three parameters are optional.

    The event consists of two pages:

    Page 1 - Contains a call to pbWildBattle.
    Page 2 - Blank, and depends on the event's Self Switch A being ON.
    In most cases, the encounter can only be done once, which means that after the battle, regardless of the outcome, the event should go to page 2. Simply set the event's Self Switch A to ON immediately after the battle.

    If the event Pokémon will only disappear because of certain battle outcomes (e.g. because of a win, capture or flee, but not because of a loss), then you will need to save the battle's result to a variable as described above. After the call to pbWildBattle, instead of simply setting the event's Self Switch, you should create one or more Conditional Branches which check the saved outcome value, and do things accordingly.


    I didn't manage how to use it (more specifically, how this save battle outcome works). Can anybody help me?
     
    The battle outcome is stored in a variable, so you can add a conditional branch to your event right after the battle to check that variable. If the variable==4 (caught) the event should increase your variable by 1. You can add the self switch A to that conditional branch as well.
     
    The battle outcome is stored in a variable, so you can add a conditional branch to your event right after the battle to check that variable. If the variable==4 (caught) the event should increase your variable by 1. You can add the self switch A to that conditional branch as well.

    Thanks! It helped me a lot.
     
    • Like
    Reactions: Poq
    Back
    Top