Get a Follower's Member Index from an Actor Id

Hello,
I'm trying to write a function that needs to obtain the followers' position.
Now I have the way to get the actor Id of the party member I want to do something on, but how can I get his/her follower index from his/her actor id?


Thanks!
Code:
Game_Actor.prototype.index = function() {
    return $gameParty.members().indexOf(this);
};

If that returns 0, it means they're the leader.
If it returns 1-3, it means they're a battler.

How you call it depends on how you're getting the actor id. If you already have the actor object, it'd be redundant to get the id from that object and then use it to get the object again, to look up the index.
Code:
Game_Actor.prototype.index = function() {
    return $gameParty.members().indexOf(this);
};

If that returns 0, it means they're the leader.
If it returns 1-3, it means they're a battler.

How you call it depends on how you're getting the actor id. If you already have the actor object, it'd be redundant to get the id from that object and then use it to get the object again, to look up the index.
I see! Thank you so much!

(yeah I am getting the actor id directly now lol)

Original thread: https://forums.rpgmakerweb.com/threads/get-a-followers-member-index-from-an-actor-id.125312/