X-Potion idea

So I want to make a potion that heals the entire party up to full hp, but goes through a number generation of 1-4 and depending on the number it adds the death status to a random party member. I know I would most likely need to run the item with a common event, but how would I go at doing the death part after the control variable?
You can assign random values right in Control Variable and then check which it is using Conditional Branch.

Which do you have a question about?
You can assign random values right in Control Variable and then check which it is using Conditional Branch.

Which do you have a question about?
The 1-4 is for each member from top to bottom but I wish for it to give that number the death status, but I want it to know if the player changes party members or changes the formation.
Again, that's right in the basic Control Variables.

1710716499283.png
Again, that's right in the basic Control Variables.

View attachment 298806
That worked, but I have one last question. What would I do for a condition to see if the random character is already dead and have it tell the player that they are already dead if they are in the number chosen?

Original thread: https://forums.rpgmakerweb.com/threads/x-potion-idea.166918/