Skip to content

← Previous | Next →


forcePokemonBattle

Description

Forces a Pokémon battle between the NPC and a nearby player within a reasonable radius and who has not lost against him. The battle is initiated without the player's consent.

Basic information

Name Type Possibilities
forcePokemonBattle behaviour 2

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 battle was successfully forced or running.
2 The battle could not be forced or not running.

Example


  POKEMON 

  id example_pokemon_id 
  name bulbasaur 
  level 5 
  moves vine_whip 

  TRAINER 

  npc AggressiveTrainer 
  pokemon example_pokemon_id 

  NPC 

  name AggressiveTrainer 
  model a_m_m_eastsa_01 
  position -1020.72 4839.78 258.30 0.0 

  interaction 
    nothing 

  behaviour 
    forcePokemonBattle