VXAce How can I make a protection enemy that prevents its allies from taking damage as long as it is alive? [Basically SOLVED]

I am trying to have a troop where as long as a specific enemy is alive, another or any other enemy will be protected besides itself. When this protector enemy dies the other enemies are no longer protected meaning they can now be damaged where as they could not have been when protected.

I have tried this before and I am trying again and would appreciate any help.
You can give an immunity state to all enemies except the protecting one, this state could put all elements to 0 and then put a troop event with condition being that the protecting enemy has 0% hp (so is dead), when the event triggers, you can remove the invincible state to all enemies.
Thank you! I had been stuck on this issue for a long time and finally found a way to make it sorta work. It was not this way but I appreciate you help. Sometimes I solve the issue after asking for help.

I do not know how to mark this as solved if possible.
You can use the report button your post and say that the thread is solved 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-a-protection-enemy-that-prevents-its-allies-from-taking-damage-as-long-as-it-is-alive-basically-solved.182871/