Need help with yanfly's target core.

● ARCHIVED · READ-ONLY
Started by zarroc407 3 posts View original ↗
  1. 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?
  2. 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.
  3. I've moved this thread to JavaScript Support. Thank you.