Check if first party member has a state?

I was wondering if any of you have a script for conditional branch that checks if the first active battler has a state?


I'm trying to make a skill that allows the healer to automatically revive the party leader as long as they have the necessary MP and TP, and then Force Action them to use it.


Before that, I have to condition them to check if the party leader is knocked out in the first place. It has to be the active party leader because the actors can change places and I don't want them to look for just one actor constantly. Can anyone help me, please?
Are you using Ace or MV?  You posted in one forum but your profile says the other.


In MV, you could do $gameParty.leader().isStateAffected(X) in a conditional branch, where X is the id of the state you're interested in (no leading zeros).  $gameParty.leader().isDeathStateAffected() will return true or false telling you if the leader is knocked out.
That was quick. I use MV now but I haven't logged in quite a while and forgot to change it. Regardless, thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/check-if-first-party-member-has-a-state.65211/