Checking if an actor in a certain party position in an IF statement.

For example, If actor 1 is in the second position, then the statement would be true.
Basically Checking if an actor is in a active spot in the party, and where they are using a script or plugin command.
Maybe this will work:
Code:
$gameActors.actor(x) === $gameParty.members()[y]
With x = your actor's ID and y = your party member index.
If you are simply checking in general, here's the code. In battle, it will only check the battle members, and when not in battle it will check all members in the party.
Code:
$gameParty.members()[x].actorId() == y

// x = position in the game party
// y = Id (from the database ofc) of the actor
Alright, I'll try them out and get back to you.

Original thread: https://forums.rpgmakerweb.com/threads/checking-if-an-actor-in-a-certain-party-position-in-an-if-statement.108425/