• 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.

[Scripting Question] having an event check if the player has captured a pokemon

  • 14
    Posts
    308
    Days
    • Seen Oct 7, 2024
    So, I am attempting to do something that I'm yet to see elsewhere and I am struggling.
    The Goal: Have my pokemon champion have 4 different pokemon based on the if the player has captured certain pokemon. I feel like i have the coding off a little bit and im not sure how to fix it. ill post the code i have with what each part SHOULD be doing. thank you all for any assistance!


    @>Conditional Branch: Script: if $trainer.hasowned[PBSpecies::DARKCELEBI]
    @>Conditional Branch: Script: if $trainer.hasowned[PBSpecies::SHADOWLUGIA]
    *Note* This version of the champion doesn't have dark celebi or shadow lugia
    @>Script:pbTrainerIntro(:CHAMPION)
    @>Conditional Branch: Script: TrainerBattle.start(CHAMPION_Kaiser, "Kaiser", 2)
    @>Script: setTempSwitchOn("A")
    @>Script: get_character(1).setTempSwitchOn("A")
    @>Script: pbTrainerEnd
    : Branch End
    @>
    : Else
    *Note* This version of the champion does not have dark celebi but it does have shadow lugia
    @>Script:pbTrainerIntro(:CHAMPION)
    @>Conditional Branch: Script: TrainerBattle.start(CHAMPION_Kaiser, "Kaiser", 1)
    @>Script: setTempSwitchOn("A")
    @>Script: get_character(1).setTempSwitchOn("A")
    @>Script: pbTrainerEnd
    : Branch End
    : Branch End
    : Else
    @>Conditional Branch: Script: if $trainer.hasowned[PBSpecies::SHADOWLUGIA]
    *Note* This version of the champion doesn't have dark celebi but it does have shadow lugia
    @>Script:pbTrainerIntro(:CHAMPION)
    @>Conditional Branch: Script: TrainerBattle.start(CHAMPION_Kaiser, "Kaiser", 3)
    @>Script: setTempSwitchOn("A")
    @>Script: get_character(1).setTempSwitchOn("A")
    @>Script: pbTrainerEnd
    : Branch End
    : Else
    *Note* This version of the champion has both dark celebi and shadow lugia
    @>Script:pbTrainerIntro(:CHAMPION)
    @>Conditional Branch: Script: TrainerBattle.start(CHAMPION_Kaiser, "Kaiser")
    @>Script: setTempSwitchOn("A")
    @>Script: get_character(1).setTempSwitchOn("A")
    @>Script: pbTrainerEnd
    : Branch End
    : Branch End
    : Branch End
     

    Attachments

    • [PokeCommunity.com] having an event check if the player has captured a pokemon
      Screenshot 2024-07-31 201801.png
      23.4 KB · Views: 1
    • [PokeCommunity.com] having an event check if the player has captured a pokemon
      Screenshot 2024-07-31 201820.png
      23.4 KB · Views: 1
    Back
    Top