• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Make NPC Check if player has a pokemon on him

  • 2
    Posts
    7
    Years
    • Seen Sep 29, 2017
    Hello !

    So I am making a new pokemon game with a group of friends, we are doing very well but,
    we would like a guy between our Route 1 and our first Town to check if the player has a Pokemon on him, and if not, make the player turn back into the town and let the player go into the lab to get his pokemon..

    I tried to copy the Guard from the Cycling Road Gate, and try to modify so he doesn't check if the player has a bicycle but a pokemon.. But i didn't find how..

    Thank you very much,

    Chronoxx98
     
    Last edited:
    I believe the wiki (this page) might help you:

    pbCheckAble(0)
    Ignoring the Pok?mon with the party index given, returns TRUE if the player has any able Pok?mon, and FALSE if they don't.

    $Trainer.pokemonCount
    Returns the number of Pok?mon in the player's party (unfainted and fainted).

    Based on those scripts, use a Conditional Branch to check the player's party.
     
    Hello, I tried but actually it is not working :/

    Could you help me with more info ? :(
     
    This way is working fine for me:

    [PokeCommunity.com] Make NPC Check if player has a pokemon on him


    You can also use pbAllFainted instead of $Trainer.pokemonCount==0
     
    Last edited:
    Wouldn't it be easier to use the variable for the starters? Like making a conditional branch with the argument "if game_variable [X]==0"
     
    Back
    Top