MV + MZ Take control and play as any event! Make other events react based on who you control! No plugin required!

You can take control of any event with a few script calls!


Put the following code in the event you want to control.
Code:
this.character(0)._characterName!=$gameParty.leader()._characterName

Code:
[this.character(0)._characterName,this.character(0)._characterIndex]
Code:
var e =this.character(0);
$gamePlayer.swap(e);
$gamePlayer.setImage(e._characterName,e._characterIndex);
e.setImage($gameParty.leader()._characterName,$gameParty.leader()._characterIndex);

Code:
var e =this.character(0);
$gamePlayer.swap(e);
$gamePlayer.setImage(e._characterName,e._characterIndex);
e.setImage($gameVariables.value(63)[0],$gameVariables.value(63)[1]);
Change 63 to your variable number if not using 63
1737486892045.png


Code:
$gamePlayer.characterName()=="2k3_Animal"//change to your event's filename
1737487137003.png



Note: If you want to control an event other than the one you talk to, change the 0 in all the this.character(0) instances to the event number!

Original thread: https://forums.rpgmakerweb.com/threads/mv-mz-take-control-and-play-as-any-event-make-other-events-react-based-on-who-you-control-no-plugin-required.174863/