• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Eventing Question] Ability-Swapping NPC doesn't function? What am I doing wrong?

  • 428
    Posts
    5
    Years
    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?
     
    Last edited:
    Back
    Top