Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

i glad you like my plugin.😁
this script if you want to create ecounter wild pokemon (eg. legendray pokemon)

PKMN.startWildEncounter([
   {
      actorId: 13,
      minLevel: 70,
      maxLevel: 70,
      regionId: 2, (set in pkmn_Ecounter for battleback)
   }
], 0);

or this, if you want set this battle cant escape:

PKMN.startWildEncounter([
   {
      actorId: 13,
      minLevel: 70,
      maxLevel: 70,
      regionId: 2, (set in pkmn_Ecounter for battleback)
   }
], 0);
BattleManager._canEscape = false;

or use this for a one-time event, use Self Switch A and activate it only if the player wins or catches that Pokémon (you  neeed create new page for self switch A:

const key = [$gameMap.mapId(), this._eventId, "A"];
PKMN.startWildEncounter([
   {
      actorId: 13,
      minLevel: 70,
      maxLevel: 70,
      regionId: 2, (set in pkmn_Ecounter for battleback)
   }
], 0);
BattleManager._canEscape = false; 
BattleManager.setEventCallback(result => {   
   if (result === 0) {     
     $gameSelfSwitches.setValue(key, true);   
   } 
});

btw you can join my discord channel here, I just set up a new discord server so we can discussion more easily, hehe: