Actor begins the battle with a state?

As the title says. Looking for a plugin that will cause an actor to gain a state as soon as any battle starts. It'll be removed after battle, but I need them to regain the state as soon as a battle starts.

Very important: This effect cannot start from the beginning of the game. It needs to be enabled by an event partway through the game.

If someone could point me in the right direction, that'd be a great help!
Hi!
If you are triggering your battle trough events, I think you can add the state to an actor through events too:
1594692655951.png

Or maybe inside the troop?
1594692783299.png
Can't you just add the state when you run the event?
@Eliaquim The first solution won't work, as the "battle processing" command in the event encompasses the entire battle- the following line won't run until the battle ends. I think just reversing the order of the two lines could work, though.

Alternatively, for the second approach, if you set the event to run on turn 0, once per battle, it can give someone a state before the first time the player gets control, even if ambushes are involved.
@Eliaquim You're right. I guess that should've been obvious.
Thread closed a

Original thread: https://forums.rpgmakerweb.com/threads/actor-begins-the-battle-with-a-state.124031/