Take a close look at 6 and 7. Those are values you can set a conditional branch off of.pbTrainerBattle itself has six arguments:
- The trainer type.
- The trainer's name.
- A message that is shown at the end of the battle (before the battle screen is closed).
- Optional. Double battle. TRUE if it is a double battle, FALSE if it isn't. If this is TRUE, then you must also check before the battle whether the player has at least 2 able Pokémon, and forbid the battle if they don't. Default is FALSE.
- Optional. A number used to distinguish between different versions of the same trainer (see above). Is 0 if there is only one version. Default is 0.
- Optional. Whether the player can continue after losing the battle. If TRUE, the player's party is fully healed upon losing the battle. You should also modify the Conditional Branch to include the "Set handling when conditions do not apply" option (i.e. an "else" part of that Branch), and insert something in there that says the player has lost the battle (you must also set a Self Switch to ON here, like if the battle was won, to prevent the trainer instantly re-challenging the player). Default is FALSE (i.e. the player returns to the last Poké Center upon losing).
- Optional. The number of the game variable in which to store the outcome of the battle. By default, no outcome is stored.
I don't get really much how to create events based on the result of a battle, i want a text to appear if i win and an other one if i lose, can someone explain me step by step how to do this?
i put 42 as variable to store result and put continue true, but where should i put the conditional branch?From the wiki:
Take a close look at 6 and 7. Those are values you can set a conditional branch off of.
the battle is a conditional branch. when you go to type out your script that contains the battle line it should be done on a conditional branch. that same line you just put var 42 and continue to true.i put 42 as variable to store result and put continue true, but where should i put the conditional branch?