- 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?
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?