MZ Checking Dead Party Members in Battle

Greetings. I am using VisuStella's Skills and States Core plugin to create a conditional passive state. The state's condition checks if one or more party members in battle are dead. I tried to create code for this, but it doesn't work. How can I fix this code?

<JS Passive Condition> condition = (deadMembers() >= 1); </JS Passive Condition>

For the context of this plugin, the "condition" variable returns a boolean to check if the condition is met or not.

In addition, my project can load, but it severely lags in battles, and the console immediately repeats the following message upon startup:
Spoiler
rmmz_troubleShooting_001.png
<JS Passive Condition>
condition = $gameParty.deadMembers().length > 0;
</JS Passive Condition>

The reason for your lag is that the condition is evaluated every frame and it's displaying a lot of console text due to your error. Don't worry about that, once you fix it the console messages will no longer display and that will stop the lag.
<JS Passive Condition>
condition = $gameParty.deadMembers().length > 0;
</JS Passive Condition>

The reason for your lag is that the condition is evaluated every frame and it's displaying a lot of console text due to your error. Don't worry about that, once you fix it the console messages will no longer display and that will stop the lag.
I tried out this code, but unfortunately, the project froze when I start a new game. And that makes sense about the condition being evaluated every frame. This occurred again when I started a new game with this code.
And it works fine without the condition?
And it works fine without the condition?
Yes, the project and battles load fine without the condition.
Weird, it works for me. Can I see your state setup in the database?
Sure thing. Here is a picture of the state setup.

I am exclusively using VisuStella's plugins, but I will test this out on a fresh project without any other plugins.

EDIT: I've tested your code on a new project and it worked perfectly. The only major difference is that I've created many passive states to check if the actor is affected by specific states (specifically the "Alertness (x)" states).
I was worried this could cause performance issues, do you think this is the problem?

Spoiler
rmmz_troubleShooting_002.png
There is a bit in the plugin help about how passives that rely on other passives don't work by design to avoid infinite loops and performance issues.
I see. I should specify the "Alertness" states check for states that are not passives, so I didn't think it would conflict with the plugin.

Original thread: https://forums.rpgmakerweb.com/threads/checking-dead-party-members-in-battle.143845/