How do I make an actor unselectable by anyone in a State?

I want to make a State that is sort of like a Death state, (I am using VE Death states notetags), but when an actor is in this state, they become unselectable to both foes and allies alike. (and of course, spells/items that do something to everyone, they are unaffected)

How can I make this happen?
If you have the YEP plugins you can do this using Selection Control.
If you have the YEP plugins you can do this using Selection Control.

Aha! I had those exact plugins under my YEP Battle Core plugins without realizing it before. That is soooo convenient and helpful, not to mention that it's attached to the Target Core which has its own set of benefits too.

Thank you for pointing that out! I would've totally missed that.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-an-actor-unselectable-by-anyone-in-a-state.152927/