Is there a way to make enemies invisible mid-turn?

Hello, I wanted enemies to have more complex attack animations where they move around and use more than 3 attack frames, so I was planning on making them invisible with a common event attached to the attack that activates a state where they go invisible, the attack plays out with an animation, then the first attack has a force action command that uses an unnamed attack to remove the state. So I would like to know if there was a way to make enemies invisible mid-turn. Also, if there is an easier way to make enemies invisible, that would also be appreciated, thank you.
Check out the Yanfly plugins.

The Skill Core has notetags where you can do things like add a state to the user without trying to use a common event. Similarly, notetags to remove the state at the beginning of their next attack without having some hidden force action command.

Or you could just program the skill using Action Sequences which include commands to change opacity - no need for any states at all.
Thank you! though, is there a way to change enemy/user opacity by default with a state? I wasn't actually able to figure that out when I made the post.
There are some suggestions for Yanfly notetags in this thread:
Including a link to this old post of mine:
The relevant property is opacity, but it's on the sprite object (Sprite_Battler), not the actor/enemy (Game_Battler). By default the sprites are set up to check their battler and update themselves; the battler does not directly have access to its "own" sprite. Yanfly's Battle Engine Core adds a battler() lookup function on Game_Battler though (or you could implement your own lookup loop), in which case you could something like:
Code:
user.battler().opacity = 128;  // 50%
Not sure whether that'll be sufficient by itself (there are other factors that alter sprite opacity) but it's worth a try~! 😂

In case it helps as a reference, here's a little plugin I wrote to adjust opacity with notetags: Cae_BattlerOpacity
The plugin is inefficient but would probably be compatible with whatever else you're using.
Thank you (=

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-make-enemies-invisible-mid-turn.160863/