MV [YEP Passive States] Is it possible for a state to check the states of another party member?

This might need a bit of an explanation. I'm looking to give a character a passive state (using Yanfly's Auto-Passive States plugin) that only activates when another party member isn't KO'd. Specifically, it's a 'Guts' style status that'll keep the character alive on 1 HP but only if a specific other party member is still fighting.
Is this possible?
I think it is possible. Try to put the below piece of code into your passive state. The state will remain when there is no KO actors in the battle.
Code:
<Custom Passive Condition>
if ($gameParty.aliveMembers().length >= $gameParty.members().length){
condition = true;}
else {
condition = false;}
</Custom Passive Condition>
I think it is possible. Try to put the below piece of code into your passive state. The state will remain when there is no KO actors in the battle.
Code:
<Custom Passive Condition>
if ($gameParty.aliveMembers().length >= $gameParty.members().length){
condition = true;}
else {
condition = false;}
</Custom Passive Condition>

Right but I'd like it to check for a specific other party member's dead/alive status, not just everyone as a whole.
you need the actor id or any other script that is used to identify the other party..
Oh nevermind, I got a solution to it. Turns out I just needed to call a Common Event that does all the proper checking as a Custom Regen dealio (on another invisible passive) and just have the Guts passive tied to a switch that that event switches on or off.
Of note, I found that Yanfly Passive States sometimes don't correctly refresh if the switch controllong them is flipped. I personally solved this by executing the following script every time after the controlling switch is flipped:
JavaScript:
$gameActors.actor(x).refresh();
However I have seen that @ATT_Turan has an alternative fix in their thread: https://forums.rpgmakerweb.com/index.php?threads/turans-terrific-tweaks.141865/

Original thread: https://forums.rpgmakerweb.com/threads/yep-passive-states-is-it-possible-for-a-state-to-check-the-states-of-another-party-member.143307/