Selecting target of Yanfly's Class Change mid-battle

Thanks to this thread, I was able to get Yanfly's Class Change screen working mid-battle via a skill.

However, this screen changes the class of the last actor selected in the menu, rather than who the user targets (usually themselves).

How can I make it so the Class Change screen targets the same actor as the skill?

Here's an example GIF of this issue. (Although Harold used the EGO/Class Swap skill, it pulled up Therese instead.)

View attachment 130057

Thank you greatly to anyone who can help! 🙂
your attachment doesn't work, but if you're using a common event attached to a skill, then you need to get the targeting data transferred to the common event.

There are several ways to do this depending on how your common event works.
Most commonly is to have the skill add an invisible target state in addition to the common event, and then the common event checks which actor has that state and targets that actor (don't forget to remove the state before next use)

If that doesn't work for you we need to see a screenhot of how your skill is structured and works.

Original thread: https://forums.rpgmakerweb.com/threads/selecting-target-of-yanflys-class-change-mid-battle.116819/