Character Resurrections

I have a character resurrection system in my game (MV)... go to temple , talk to priest, character(s) live once more.
I'm running into the problem of the priest not recognizing when no one is dead. If I were to choose Resurrection in the choices he gives the party, he takes the money and the game follows the script , even though no one needs the service. What I want to have happen is if no one needs rezzing then the priest will say "You don't need that service now" (or something to that effect, but cooler.) when someone does need rezzing, it works just like I want it to, with the character coming back with 1 HP and no one else effected. Any help with switches or variables would be greatly appreciated.
Moved to: MV Support

Have you actually done anything to add this condition and it's just not working? Show us your event.
Make a Conditional Branch -> tab 4, Script -> $gameParty.deadMembers().length>0 then do your resurrection stuff. In the Else branch, say everyone is alive and don't take their money.
Moved to: MV Support

Have you actually done anything to add this condition and it's just not working? Show us your event.
This is the whole process. Everything works right except I can't figure out the right process for when no one needs rezzing.

◆Text:People2(2), Dim, Middle
: :Welcome Arquin's Temple. What do you need
: : of the Gods?
◆Show Choices:Potions, Blessing, Resurrection, Nothing right now (Window, Right, #1, #4)
:When Potions
◆Shop Processing:Potion
: :Magic Water
: :Dispel Herb
: :Pheonix Down
◆
:When Blessing
◆Change State:Entire Party, + Blessed
◆Play SE:Recovery (90, 100, 0)
◆Text:People2(2), Dim, Middle
: :The Gods have blessed you.
◆
:When Resurrection
◆Text:People2(2), Dim, Middle
: :Resurrections are tricky, but I will try.
: : The Gods require a donation of 50 Gold.
◆If:Gold ≥ 50
◆Change Gold:- 50
◆Fadeout Screen
◆Play ME:Organ (90, 100, 0)
◆Wait:120 frames
◆Change State:Entire Party, - Knockout
◆Fadein Screen
◆
:Else
◆Text:None, Window, Bottom
: :You don't have enough money.
◆
:End
◆
:When Nothing right now
◆Text:People2(2), Dim, Middle
: :I will be here if you need the Gods.
: : Go in peace.
◆
:End
◆Text:People2(2), Dim, Middle
: :May the Gods bless your journey.
The following in the script part of a conditional branch will let you specify different actions based on whether any party member is dead:

Code:
Conditional Branch: Script: $gameParty.deadMembers().length === 0
  ... this means there are no dead members
Else
  ... this means there is at least one dead member
End

And if you are calling from a map event, it will look at battlers as well as reserve.

edit: Oops - didn't see @ATT_Turan 's post up there!
Make a Conditional Branch -> tab 4, Script -> $gameParty.deadMembers().length>0 then do your resurrection stuff. In the Else branch, say everyone is alive and don't take their money.
Awsome! That worked. thank you!!

Original thread: https://forums.rpgmakerweb.com/threads/character-resurrections.137189/