Enemy Transform issues.

Hey there. I am having a really strange problem with my project:

I have being working on creating a 'range' system in which enemies can move further away or closer to the player, changing their move set as well as resistances etc. (Essentially it's just a normal enemy transformation with a bit of a flair) I made the system for one enemy, and it works fine. They transform fine and all that. This is the setup that I created for them.
1610985042967.png

1610985077925.png

1610984969486.png

There's no problem there; however. I made a second troop who was supposed to do the same thing. However a really weird bug has happened when they retreat and then attempt to move forward again. And instead of advancing, instead they change into the first enemy for no apparent reason.
1610985234133.png

1610985882690.png

1610985905598.png

It is quite difficult to explain, and I don't have any common events or anything related to this as far as I can tell. If anybody knows anything about this, I would like to hear any advice you may have, and can answer questions about this.
Are you using Yanfly plugins?

There is a Yanfly plugin called "Base Troops Events", this plugin repeat all the events from your first troop on all the troops, check if you have this plugin, disable it and try again.
I will try that. Thanks. It sounds pretty suspect.
It worked! Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/enemy-transform-issues.132360/