I'm trying to set up a custom target eval so that when a user has a certain state the skill hits all enemies and when he doesn't have it it can only hit one. The problem is I don't really understand how the code for the custom target works can anyone help me?
Need help with yanfly's target core.
● ARCHIVED · READ-ONLY
-
-
I just tried this with 2 enemies, should work.
Code:<Custom Target Eval> if (user.isStateAffected(X)) { for (var i = 0; i < foes.aliveMembers().length; ++i) { var member = foes.aliveMembers()[i]; if (user.isStateAffected(X)) targets.push(member); }} else {targets.push(target); }; </Custom Target Eval>
Just make sure to replace the X value for the stateId you want. -
I've moved this thread to JavaScript Support. Thank you.