Battle screen flicker issue when actor battler graphic changes

Hello all!

I have a common event set up where it checks what equipment my actors have, and then changes their battler image based on what the equipment is.

It works perfectly!

However, one thing I've noticed is there is a weird screen flicker sometimes on the battle screen. This flicker ONLY happens when I've changed the equipment. I've tested to see if the flicker still appears when the common event is disabled, and it doesn't. So I know the issue must be related to the common event.

At first I thought it was a image cache problem, so I added the image file names to my cache plugin, but the flicker still appeared.

Not sure if it will help but here is a screenshot of how I set up the common event: https://pasteboard.co/JaPYcFb.png (That's just a portion of it, but the rest of the common event follows that same pattern)

Maybe it's something simple that I've forgot to do, or something more complex. I'm not sure, but I'm having some real trouble figuring out what it is, so any help would be super appreciated!!
More than likely the flicker you are seeing is the common event running, the equipment getting checked, and the sprite getting updated accordingly.

Can't really tell from the screenshot -- what calls the common event?

Best guess is that the common event is running and updating the sprite unnecessarily.

I'm guessing you will need to add some conditions to make the common event only change the sprite when necessary or change the circumstances under which the common event runs eg: make it not run during battle, or only run at particular times during battle.
More than likely the flicker you are seeing is the common event running, the equipment getting checked, and the sprite getting updated accordingly.

Can't really tell from the screenshot -- what calls the common event?

Best guess is that the common event is running and updating the sprite unnecessarily.

I'm guessing you will need to add some conditions to make the common event only change the sprite when necessary or change the circumstances under which the common event runs eg: make it not run during battle, or only run at particular times during battle.

Thanks for your comment!! I'm actually using Yanfly's Common Events Utility plugin. I've set it up to only run the common event each time the player closes the menu. I thought this plugin would be the solution to this, but maybe there's a better way?
Hi everyone! Here is how the glitch looks: &

I also have a script in the common event (that checks for when the player has nothing equipped) This is it:
Code:
$gameActors.actor(1).equips().contains($dataWeapons[0])

Maybe that's the cause. I have no idea. It's very odd! Hopefully seeing an image of what the problem is will help solve this. As you can see, the flicker is a box and it's on the battle screen right at the start for like a millisecond.
Okay guys, I think I have figured out the problem.

It seems that setting "Scale Battlebacks" to false in Yanfly's Core Engine plugin has fixed this. I've resized it manually instead and no longer seem to be getting the box flicker anymore. It was okay having it on true until I made this common event, but I'm glad putting it on false seems to have fixed it!

Original thread: https://forums.rpgmakerweb.com/threads/battle-screen-flicker-issue-when-actor-battler-graphic-changes.122254/