Party member dissappearing when dead

Hey I was wondering if there are any scripts I can get the would make a character disappear from the battle when dead, move to the back of the reserves list, and the first of the reserves takes his place. I'm currently using Yanfly's core engine, battle engine, and visual battlers for the battles. I'm also using Yami's core and all the guardian scripts as well.
With a couple of minor limitations, I believe you could do this using Troop Events rather than needing a script.

Not to say that it's not alright to ask for a script, but just wanted to make sure you're aware it can be done without. 🙂
You can do that for each end's turn without script.

Just a troop conditional check on state 1(death) of actor.

A simple remove the dead actor from party and add the actor back will do the trick to put the actor to the back of the party list.

And your "reserved" actor should automatically move up in the party slot to replace the dead member.

You just need to make a common event to do all that, and run that common event at each end's turn of every single troops you have in the troops editor.

But if you have other custom script(s) effecting the party members' behaviour(eg, slot fix, auto sort, etc), that might not work.
With a couple of minor limitations, I believe you could do this using Troop Events rather than needing a script.

Not to say that it's not alright to ask for a script, but just wanted to make sure you're aware it can be done without. 🙂
How would you use the battle event to do that?
You can do that for each end's turn without script.

Just a troop conditional check on state 1(death) of actor.

A simple remove the dead actor from party and add the actor back will do the trick to put the actor to the back of the party list.

And your "reserved" actor should automatically move up in the party slot to replace the dead member.

You just need to make a common event to do all that, and run that common event at each end's turn of every single troops you have in the troops editor.

But if you have other custom script(s) effecting the party members' behaviour(eg, slot fix, auto sort, etc), that might not work.
I will try this thanks.
MeowFace pretty much got it, above.

You can also use Hime's Custom Page Conditions script to make your troop events much easier to create (and they can also safely run at each moment instead of each turn if you use the Custom Page Conditions for this event).  This will allow you to check for things like "$game_party.members[0] != nil and $game_party.members[0].dead?" to see whether the substitution should be made on Actor #1.
Ok I tried to do a battle event and it doesn't seem to want to work. What am i missing I have set like this.

condition: When at end of turn           Span: Battle

conditional branch: [] is [death] inflicted

>change party member: Remove []

>change party member: Add []

else

>

Never mind I got it working I guess it has to be set at turn.
If you are trying this in a one man party (or when only 1 member is alive), it won't work.


If all party members are dead (state 1 inflicted), it's a sure way to the game over screen, this behavior is automated.


That's why Meow's method won't work in all situations.
If you are trying this in a one man party (or when only 1 member is alive), it won't work.

If all party members are dead (state 1 inflicted), it's a sure way to the game over screen, this behavior is automated.

That's why Meow's method won't work in all situations.
Yep I know I have it set for the actual game and tested it there and it work. The only thing I wasn't able to test if it is 4 or less, which i think the player will not dissappear at death. I'm ok with this though.
Rather than do this in every single troop, you might want to consider using Yanfly's Base Troop Event script. Then you would just set it up once and it would automatically run for every battle.
Rather than do this in every single troop, you might want to consider using Yanfly's Base Troop Event script. Then you would just set it up once and it would automatically run for every battle.
Cool I'll add that in I already use his core.

Original thread: https://forums.rpgmakerweb.com/threads/party-member-dissappearing-when-dead.46122/