MV Yanfly's Action Sequence and Premature Deaths (with Olivia's)

Hello,

I am having trouble setting up an action sequence that is allowed to complete before the enemy dies.
Currently my enemy battler is dying mid action sequence then the rest of the action sequence plays out.

Could some help explain how to do this correctly or what errors I am making?


Action sequence for 2 Hit attack:

"Combo Attack"

<Setup Action>

immortal: targets, true

</Setup Action>

<target action>

motion swing: user

motion wait: user

wait: 10

action animation

wait for animation

action effect: target

motion swing: user

motion wait: user

action animation

wait for animation

action effect: target

</target action>

<follow action>

immortal: targets, false

</follow action>


I am wondering if it also has to do with the effect of hiding and respawning certain enemies. (picture below)


Using Yanfly's and Olivia's Battle System. Which I believe causes this to take effect immediately using "Turn" and is overriding the action sequence?

Appreciate the help, Thanks!

FYI haven't posted in a while, sorry if wrong thread location.
That would be my guess, that the troop event is cutting in.

The only other thing that is a bit off but wouldn't have anything to do with your problem, is typically you'd turn immortal off during the finish action, not a follow action.

I think you could do a workaround by calculating the damage of the first attack, and if it would kill the enemy you just set them to 1 HP instead, so the troop event doesn't get triggered until after the second hit.

Or you could accommodate it by putting a check in between them to end the skill early if the first attack kills them, or jump to a second target.
Hey Thanks for the response,

Would you be able to show me a example of how that would look?

Also would setting an enemies hp to 1 be something that would have to be done on a skill by skill basis, or could this be worked in to Yanfly's base damage calculations?
Would you be able to show me a example of how that would look?
Code:
get rid of setting the target to immortal in the first place, then do your stuff for the first attack
if target.isDead()
  Eval: target=$gameTroop.aliveMembers()[Math.randomInt($gameTroop.aliveMembers().length)];
  Eval: var origTarget=false;
end
if target
  motion swing: user
  motion wait: user
  action animation
  wait for animation
  action effect: target
end
That will make it attack a second random target if the first attack kills the first one.

Also...I just realized that you don't have any movement or extra animations or anything going on here. There's no reason you need to use an action sequence for this skill at all. Just copy the regular attack skill and put the the Repeat field to 2.
Also would setting an enemies hp to 1 be something that would have to be done on a skill by skill basis, or could this be worked in to Yanfly's base damage calculations?
I've never used that plugin, you'll have to read the instructions and see how/when it works.
Thanks i'll give it a try, and let you know the results.

Originally I was using the RPG MV base setting to add +1 Attack to a Weapon.
Like being able to hit 2x with Knuckles Weapon.

So I tried switching to an action sequence to see if I could get both hits to land and calculate before the enemy battler died, but had the same result.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-action-sequence-and-premature-deaths-with-olivias.142402/