I was wondering how would I make the enemy a certain ally if they a certain state. For example, Actor 1 has the "Poison" state, enemies will now target Actor 1 until the "Poison" state is gone.
Adjusting Enemy Tartgeting with VisuStella Battle Core
RPG Maker MZ SupportYou could put this notetag into all of your single-target skills that enemies use:
Code:
<JS Targets>
let targets2 = $gameParty.aliveMembers().filter(actor => actor.isStateAffected(X));
// where X is the ID of your poison state, no leading zeros
if (targets2.length>0)
targets = targets2;
</JS Targets>
This worked like a charm. Thanks for the help.
Original thread: https://forums.rpgmakerweb.com/threads/adjusting-enemy-tartgeting-with-visustella-battle-core.164460/