MZ Specific Party leader events

Hey developers, is there any way that I can make an event, (Or if anyone has a plugin I can use) To make it so that an event is only active when a certain party member is at the head of the party something similar to OMORI.


Thanks,
GAMEMONKEI
control variable can get you the ID of the actor in any of the first eight party positions (game data section that defaults to map id but can get you hundreds of other data as well).

simply make the event fire anytime, then check which actor is in the first position and either do something for that actor or abort the event

no javascript needed at all
If (condition){do something}
if (Party leader == Somebody) {do something}
if ($gameParty._actors[0] == *whoever* ) {*run custom script*}

In a conditional branch command you just need to type the condition in the script box
$gameParty._actors[0] == *whoever*
Because it's evaluating true or false

Script in Move Routes or Map/Battle Events would require the full statement. Although there is a short hand:

condition ? when true : when false
$gameParty._actors[0] == *whoever* ? var = this value : var = this other value

Original thread: https://forums.rpgmakerweb.com/threads/specific-party-leader-events.147717/