Messed up on my eventing. Any ideas to fix?

So at various stages of the game, I've had scenes where I've had the main character get hit by an attack, and I'll use an event to change the image of my main character to the defeated in battle sprite.

Problem is, I'm realizing now players can change the first person in line, so that event will change the sprite to the character to the defeated sprite for the default character, but not for whichever character is actually at the front of the party at the time.
Rather than deleting, it would be good if you could explain how you fixed it, as this could help others who are trying to have the same mechanic.
Yeah...so funny thing is I was right the first time. It is an issue.
This link of script calls has your answer. I am an MZ user (and a beginner), but everything is the same with respect to what follows in this post between MV and MZ, and I will do my best to explain...

What you want to do is to create scripts instead of event commands (or more easily, insert this piece of script into your event commands such as conditional branches), where you replace the index portion of $gameParty.members()[index] with the party slot that you wish to target. With this particular sort of index, it starts at 0, so first slot is 0, second slot is 1, third slot is 2, and so on.

For your example, you mentioned the first party slot, so, the way that this particular indexing works is that we are going to type $gameParty.members()[0]. Hope that sets you on the right path.

On that link I shared you can use the tabs at the bottom to navigate to all the script call equivalents of event commands on the event command pages. It will certainly get more complicated if you need to fully script out changing animations, etc. But it's entirely within the realm of possibility, and it's not too late. You can make conditional arguments that—if party member in first slot is actor 1, then..., if party member in first slot is actor 2, then..., and so on.

EDIT: OR make it easier on yourself and disable party formation entirely.
Oh wow, I didn't realize I could actually just disable it. I always find it funny how with game design the best solution is simple. I didn't even know you could disable it

Original thread: https://forums.rpgmakerweb.com/threads/messed-up-on-my-eventing-any-ideas-to-fix.158664/