• 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!
  • Dawn, Gloria, Juliana, or Summer - 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] Limiting in-battle Item use

  • 44
    Posts
    7
    Years
    • Seen Jul 13, 2021
    Hello!
    I want to know how I can make it so that the player can only use as many items as the enemy can.
    Let's say the enemy trainer has 3 potions and 2 full heals.
    I want the player to only be able to use 5 items (doesn't matter which), and then be unable to use more items on his Pokémon (meaning that Pokéballs can be used still, to avoid it not working on wild battles).

    If the enemy has no items, the player cant use any, etc etc.

    I know it is done somewhere around here:
    [PokeCommunity.com] Limiting in-battle Item use


    But I don't know how to actually program it.
    If someone can help me, I would gladly appreciate it.
    If theres questions ask me too,

    Thank you!
     
    Back
    Top