- 428
- Posts
- 5
- Years
- Zekko
- Seen Nov 21, 2023
I've added a NPC to Oak's Lab who is supposed to change the ability of the Pokemon in Slot 1 when asked. But he doesn't seem to be able to change the abilities of any of my Pokemon. Even when I try using a Pokemon with two different regular abilities and a different hidden ability.
Here's his code(with all the in-character "Hi there!" talking removed):
Select an Ability for your Pokemon in Slot 1.
\ch[1,-1,
Reset Ability,Ability 1,Ability 2,Ability 3,Exit]
Then I've got the "Conditional branch variable, temp pokemon choice == 0" stuff, the same for choices 1, 2, 3, and Exit(which just jumps to the label above the "Okay, bye!" text at the end of his event).
Reset ability does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = nil
Ability 1 does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = 0
Ability 2 does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = 1
Ability 3 does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = 2
This code seems simple and it should work, so what's going wrong? Why is it that when I talk to him and select an option, nothing happens to the ability of my Pokemon in slot 1?
Here's his code(with all the in-character "Hi there!" talking removed):
Select an Ability for your Pokemon in Slot 1.
\ch[1,-1,
Reset Ability,Ability 1,Ability 2,Ability 3,Exit]
Then I've got the "Conditional branch variable, temp pokemon choice == 0" stuff, the same for choices 1, 2, 3, and Exit(which just jumps to the label above the "Okay, bye!" text at the end of his event).
Reset ability does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = nil
Ability 1 does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = 0
Ability 2 does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = 1
Ability 3 does this:
pkmn = $Trainer.first_able_pokemon
pkmn.ability_index = 2
This code seems simple and it should work, so what's going wrong? Why is it that when I talk to him and select an option, nothing happens to the ability of my Pokemon in slot 1?
Last edited: