• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

How to use the $Trainer.shadowcaught array

94
Posts
11
Years
    • Seen May 4, 2018
    Hello. I've been trying to use the $Trainer.shadowcaught[species] array but I just can't figure out how.

    I want to make a Conditional branch where you fight a Trainer with a Shadow Pokémon and if you already caught the pokemon, be able to fight again against this trainer but without the Shadow Pokémon. Or even make a "Miror B" trainer like the Wiki page suggests but I don't know how to do this event either.

    I tried it like this:

    Conditional Branch > Script: $Trainer.shadowcaught[GEODUDE]
    -Fight Trainer without Shadow Geodude
    Else
    -Fight Trainer with Shadow Geodude
    End

    Or even like this:

    Script: $Trainer.shadowcaught[GEODUDE]=true
    Script: $Trainer.shadowcaught[074]
    Script: $Trainer.shadowcaught[species]=GEODUDE

    This should give you an idea of how lost I am.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Firstly, $Trainer.shadowcaught[PBSpecies::GEODUDE]. Secondly, it is set to true automatically when capturing a Shadow Pokémon of that species. Thirdly, you're correct the first time with the Conditional Branch business.
     
    94
    Posts
    11
    Years
    • Seen May 4, 2018
    Oh, I would have never guessed I had to use "PBSpecies::" too. It works now. Thank you.
     
    Back
    Top