Targeting two random dead members. (Yanfly's Selection control & Action sequence)

Hello people!

The idea under this effect is simple enough.

Its a skill that automatically selects two random dead members of the party to bring them back from KO.

Im working with Yanfly's Selection control but I guess I cannot find the right formula.

For reference, below is the formula that Yanfly uses to make a skill which targets between 5 and 10 random foes and causes some damage to them.

Also Action sequence plugin is used as well.

Thanks in advance!


<Custom Target Eval>

var times = 5 + Math.randomInt(6);

var members = foes.aliveMembers();

while (times--) {

var member = members[Math.floor(Math.random() * members.length)];

targets.push(member);

}

</Custom Target Eval>



<whole action>

perform start

motion standby: user

wait for movement

face user: targets

</whole action>



<target action>

motion attack: user

wait: 10

animation 38: target

attack animation: target

wait: 10

action effect

</target action>



<follow action>

Immortal: targets, false

wait for animation

<follow action>
How many instances in your game are going to have 3 or more party members dead? Usually people will revive after 1 or 2 drop, sense dead actors = increased time it takes for the battle to be over. Do you have bosses with instant kill attacks that leave one party member alive? I'll try to come up with something nontheless
Try this. The second one is a common event
Random revive1.png
Random revive2.png
Random revive3.png
Thank you so much for responding!

Regardless this is an issue I've been looking for an answer almost for two weeks, an imaginative wording on google found me this thread.

This plugin presented here is more that I could ever hoped for.

https://forums.rpgmakerweb.com/index.php?threads/select-multiple-targets-v2-0-1.104341/

Original thread: https://forums.rpgmakerweb.com/threads/targeting-two-random-dead-members-yanflys-selection-control-action-sequence.114086/