← Previous | Next →
startPokemonBattle
Description
Initiates a Pokémon battle between the character's trainer and an NPC. The result of the battle can be a win, loss, tie, or an forced stop.
Name | Type | Possibilities |
startPokemonBattle | interaction | 4 |
Parameters
# | Name | Type | Mandatory | Description | Multiple |
1 | actives | integer | No | The number of active Pokémon in the battle. For example, 2 would be a 2v2 battle. | No |
2 | NPC | NPCID | No | Additional NPC in rival team. | Yes |
Outputs
# | Description |
1 | The character's trainer won the battle. |
2 | The character's trainer lost the battle. |
3 | The battle ended in a tie. |
4 | An error occurred during the battle initiation. |
Example
POKEMON
id example_pokemon_id
name bulbasaur
level 5
moves vine_whip
TRAINER
npc Rival
pokemon example_pokemon_id
NPC
name Rival
model a_m_m_eastsa_02
position -1020.72 4839.78 258.30 0.0
interaction
startPokemonBattle 2
tell "Congratulations, you won!"
tell "You lost the battle."
tell "It's a tie!"
tell "Something went wrong during the battle."
behaviour
nothing