You should consider joining our Discord to ask for support.

We created a support channel using the new Discord Forum feature!

You can also visit our new website, it has a help section in English and French

0 like 0 dislike
558 views
in Script help by (530 points)
I want to evolve a Pokemon in the party through an event, but I can't figure out how.

1 Answer

0 like 0 dislike
by (28.0k points)
Silent way:
$actors[x].evolve(id, $actors[x].form)
 

Animated way:
GamePlay.make_pokemon_evolve($actors[x], id, $actors[x].form)

Replace x with the index in the party, id with the ID of the pokemon to evolve to
by (28.0k points)
If you need to find the x for a pokemon in the party you can do:
x = $actors.find_index { |pokemon| pokemon.id == 2 }

where 2 is the ID of the Pokemon who should evolve (Ivysaur)
by (28.0k points)
Example:
x = $actors.find_index { |pokemon| pokemon.id == 2 }
$actors[x].evolve(3, $actors[x].form) if x

Note: that if the pokemon is not in the party, x is nil !
...