Hey Ramza, I purchased your plugin last year and works great. But I have one issue. My duel wield attacks, even after the enemy is gone. Is there a way to stop attacking once the enemy is dead? sorry for the nube question
Hi there.
Someone asked this question before, and my experimenting with a workaround to make it work for them actually led to me incorrectly thinking I had a weird bug in a newer version.
There is no way to prevent the second attack in the case that an enemy dies after the first one, not within this plugin, anyway. The way the attack times + trait is programmed is that it just repeats the target action section multiple times, as if it were all part of the same sequence. It doesn't do a check in between. My plugin simply hooks into this, and swaps weapon stats around (and images) when the second attack is made.
What you can do is make your attack sequence check to see if the target is dead first, and not do anything in the target section at all. This will cause the second attack to not happen if the first killed the target, but it has another issue in that action sequences that already contain and if check will not work, as they can't be nested. You could get around this with a different plugin (like this one by SergeofBIBEK).
If you're not using Yanfly's action sequences plugins at all, you'll need those in order to make this change first.
If you're already using an action sequence, simply wrap the target action in a check to see if the target is dead, and if it is, do nothing:
before:
<target action> motion attack: user wait: 12 attack animation: target wait: 3 action effect: target wait for animation </target action>
after:
<target action> if (target.hp > 0) motion attack: user wait: 12 attack animation: target wait: 3 action effect: target wait for animation end </target action>
Like I said above, if your sequence already has an if check in it, nesting them doesn't work, but you can fix that with the plugin I linked.
-Ramza