How to get the level of the first member of the group in a variable?

Hello, I want to create a condition where if my enemy's level (which is in a variable) is higher than my character's then something happens, but I'm making a Pokémon style game, so I can't predict who the character will be the first member of the group, and to get the level in the variable using the game data it only gives me the option of getting specific characters, and I don't know how to get a character's parameter in a variable other than this, could anyone help me with this ?
Thanks in advance!
Script calls are your friends 🙂

If you want to store the first party member's level in a variable, type $gameParty.members()[0].level in the script option
Script calls are your friends 🙂

If you want to store the first party member's level in a variable, type $gameParty.members()[0].level in the script option
Thanks bro, it worked here, I really appreciate it, can I get the character's other attributes in the same way?
You're welcome! and yeah sure, you can get any property of the actor's object in the database in the same way

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-the-level-of-the-first-member-of-the-group-in-a-variable.161320/