• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Evolution via Event

hi all ive modified the script provided above to allow the user to define what pokemon is to be forced to evolve and gives a small message if its the right one or the wrong one but crashes when the selection screen is cancelled out any way to fix this?

EDIT
ok so fixed the code no longer crashes and now displays text for correct species selected, incorrect species selected and if the selection is cancelled unfortuantly i can not get it so the text can be different per event but one solution is to have multiples of this script just with a different name and modify each accordingly
Code:
def pbForceEvo2(pkm)
  pbChoosePokemon(1,3)
  if pkm==$Trainer.pokemonParty[$game_variables[1]].species
    Kernel.pbMessage(_INTL("A bright light shines upon {1}.",$game_variables[3]))
  pkmn=$Trainer.party[$game_variables[1]]
  for form in pbGetEvolvedFormData(pkmn.species)
    newspecies=form[2]
  end
  return if !newspecies
  if newspecies>0
    evo=PokemonEvolutionScene.new
    evo.pbStartScreen(pkmn,newspecies)
    evo.pbEvolution
    evo.pbEndScreen
    end
  else
    if $game_variables[1]<0
      Kernel.pbMessage(_INTL("A bright light shines upon {1} but nothing happens.",$Trainer.name))
    else
      Kernel.pbMessage(_INTL("A bright light shines upon {1} but nothing happens.",$game_variables[3]))
    end
  end
end
 
Last edited:
Back
Top