Determine lead actor in RMVX ?

Hey all, it's me again.

I'm making a game where there's a drug mechanic, now the drug would have to be useable only by the party leader. Also, since there's a common event that controls the effects of the drug each time it is used, I need a way to determine who is the leader exactly.

I know in RMVX Ace there's a variable for precisely that, but I don't think it exists in RMVX. So do I have to use scripts ? Which one would that be ?

I have a second question, which is related to the first one : is there any way to make an event affect only the leader of the party ? As in, the drug common event. Can I only have it affect the party leader ?

Any help or input, of any kind at all, is appreciated.
Bump because I really, really need some advice. Sorry if I'm obnoxious 🙁
$game_party.members[0] will give you the actor.


$game_party.members[0].id will give you the actor id.
Thank you Shaz, you beautiful bastard ! Now do I need a script call or a conditional branch or a variable to implement it with my mechanic ? To explain myself, there are four effects : a progressive tint screen (which is easy and can be applied to the whole party), a slow-motion effect (there's a script for that), a defense bonus and an "addiction" common event. It's for these last two that I need to determine the party leader. How do I set those effects to affect only your script ?
If you only want the commands in your common event run if a certain character is your party leader, you would enclose the command list inside a Conditional Branch like this:

Code:
Conditional Branch: Script: $game_party.members[0].id == 5  ... do stuff hereBranch End
The above would only make the code run if Actor 5 is in the lead.
It works perfectly ! Thank you Shaz, once again you solved a stupid problem of mine. This topic can be closed.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/determine-lead-actor-in-rmvx.36362/