• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!

How to change a Pokémon's form via an NPC+party selection?

Jelly

Novice
Member
Joined
Mar 7, 2021
Posts
22
Hi, I feel kind of stupid because this probably has a simple solution but I cannot find it online and I'm not skilled enough to understand my mistakes on my own-
... Anyway, what I'm trying to do is having an NPC that can change Furfrou's trim.
I have come up with this:

Ruby:
Expand Collapse Copy
pbChoosePokemon(1, 3)
Conditional Branch: Script: pbGetPokemon(1).isSpecies?(:FURFROU)
Text: Which Trim were you thinking about?
Show choices: [text1, text2, text3]
When: [text1]
$player.pokemon_party.each do |pkmn|
  next if !pkmn.isSpecies?(:FURFROU)
  pkmn.form = 0
  pbSet(1, pkmn.name)
  break
end

... This only works with the first Furfrou in the party, though.
If you have two or more Furfrou, even if you select another, only the first one will get its Trim changed.
I guess it's because I'm not quite telling the game to keep into consideration which Pokémon the player is picking, besides merely checking if it's a Furfrou or not, but I don't understand how to change the script accordingly :I
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
You don't need to loop through the party after you selected one. That currently makes it so only the first furfrou gets changed.

Instead, just do
Ruby:
Expand Collapse Copy
$player.pokemon_party[pbGet(1)].form = 0
 

Jelly

Novice
Member
Joined
Mar 7, 2021
Posts
22
You don't need to loop through the party after you selected one. That currently makes it so only the first furfrou gets changed.

Instead, just do
Ruby:
Expand Collapse Copy
$player.pokemon_party[pbGet(1)].form = 0
Oh, that's why! Thank you very much :)
 
Back
Top