• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Apologies if you've had troubles connecting to the site, you may need a VPN to access it. Staff are also facing issues connecting, so if it's urgent please message Cat on-site or through Discord directly.
  • Hey Guest, staff applications are open! If you are interested in becoming a forum staff member and/or Discord staff member, please apply through this Google Form before April 2! You can also message Cat with any questions.

SOLVED: Checking if you have a Pokemon of a certain level

pkmnacademia

Trainer
Member
Joined
Mar 24, 2023
Posts
59
I wanted to make an event check if you have a Pokemon with you that's level 50 or higher, but I can't figure out quite how to do it.

I know there needs to be some kind of "pkmn.level >= 50" check, and I think I know how to do that with individually selected Pokemon, but I'm not sure how to apply it to the entire party.

Anyone know how to do this?
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
598
I wanted to make an event check if you have a Pokemon with you that's level 50 or higher, but I can't figure out quite how to do it.

I know there needs to be some kind of "pkmn.level >= 50" check, and I think I know how to do that with individually selected Pokemon, but I'm not sure how to apply it to the entire party.

Anyone know how to do this?
Ruby:
Expand Collapse Copy
$player.pokemon_party.any? { |p| p&.level >= 50 }
 
Back
Top