MV YEP Action Sequence & Row Formation

This is for MV.

I'm using Yanfly's Action Sequence packs and Row Formation plugins. I'm attempting to create a special attack that pushes an enemy back 1 row. Row Formation formation lets you add a skill note tag, <Push Back Target Row: 1>, to accomplish this. However; the skill I'm creating has the player attack twice (a downward slash followed by a thrust motion). I'm trying to find a command I can enter within the Action Sequence code to push the enemy back, as opposed to the notetag. The reason being... when the note tag is attached to the skill, you actually push the enemy back 1 row with EACH attack. I only want to push the enemy back with the 2nd attack (the thrust).

Only way I can think of accomplishing this is to have a command entered into the action sequence after the thrust attack is done. I can't find anything, though. Figured there might be something hidden within lunatic mode that I'm not seeing and wanted to see if anyone knew or used this before?

Thanks! 😎
You can create a conditional push-back that only occurs if a certain switch is off. Replace # with the id of the switch you want to use.

Code:
<Custom Target Row>
   if (!$gameSwitches.value(#)) {
     row += 1;
   } else {
     row = target.row();
   }
</Custom Target Row>

Then, within your action sequence, include:

Code:
change switch #: on

after the first attack. Then, at the end of the action sequence, turn the switch back off.

Code:
change switch #: off
You can create a conditional push-back that only occurs if a certain switch is off. Replace # with the id of the switch you want to use.

Code:
<Custom Target Row>
   if (!$gameSwitches.value(#)) {
     row += 1;
   } else {
     row = target.row();
   }
</Custom Target Row>

Then, within your action sequence, include:

Code:
change switch #: on

after the first attack. Then, at the end of the action sequence, turn the switch back off.

Code:
change switch #: off
Out of curiosity, do I have this set up correctly? It's still pushing back 2 rows (1 per attack), even when I activate the switch after the 2nd attack. I'm guessing it's a user error and my fault. I've had the Custom Target Row above and below the target action, as well. Same result.

<target action>
move user: target, base, 8, auto offset x -50
MOTION SWING: user
SE: Battle_R3-M1_Sword Attack1, 100, 100, 0
animation 151: user
action effect
if !target.result().missed && !target.result().evaded
wait: 5
SE: Battle_Damage1, 100, 100, 0
wait: 30
MOTION THRUST: user
SE: Battle_R3-M1_Sword Attack1, 100, 100, 0
animation 184: user
action effect
change switch 332: on
if !target.result().missed && !target.result().evaded
wait: 5
SE: Battle_Damage1, 100, 100, 0
add state 42: target
ELSE
...
END
ELSE
...
END
change switch 332: off
</target action>

<Custom Target Row>
if (!$gameSwitches.value(332)) {
row += 1;
} else {
row = target.row();
}
</Custom Target Row>
You need to move "change switch 332: on" to just after the first instance of "action effect", as action effect is what causes the knockback code to run. The code you pasted turns the switch on after the second instance of action effect, which won't have the intended result.
You need to move "change switch 332: on" to just after the first instance of "action effect", as action effect is what causes the knockback code to run. The code you pasted turns the switch on after the second instance of action effect, which won't have the intended result.
I've tried a couple of variations and cannot seem to get it to work on the second attack only. When I put it after the first action effect, it pushes the enemy back on the first attack but not the second. If I put it after the second attack... it pushes the enemy back 1 row for each attack again (2 rows in total). I've moved the switch to various places, and I get one of those two... but cannot (for some reason) get it to push back the target on the second attack/action effect. Here's how I have it set up per your last reply, but I've also tried putting the switch on in various places throughout the action sequence.

<target action> move user: target, base, 8, auto offset x -50 MOTION SWING: user SE: Battle_R3-M1_Sword Attack1, 100, 100, 0 animation 151: user action effect change switch 332: on if !target.result().missed && !target.result().evaded wait: 5 SE: Battle_Damage1, 100, 100, 0 wait: 30 MOTION THRUST: user SE: Battle_R3-M1_Sword Attack1, 100, 100, 0 animation 184: user action effect if !target.result().missed && !target.result().evaded wait: 5 SE: Battle_Damage1, 100, 100, 0 add state 42: target ELSE ... END ELSE ... END change switch 332: off </target action> <Custom Target Row> if (!$gameSwitches.value(332)) { row += 1; } else { row = target.row(); } </Custom Target Row>
Ah, okay, I misunderstood. You want the push back to happen on the second attack, not the first. Sorry about that!

Move "change switch 332: on" to the very beginning of the action sequence, then place "change switch 332: off" immediately after the first instance of "action effect".
You're amazing and this works beautifully. Thank you!!!!

:XP1:​
No problem, happy to help!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/yep-action-sequence-row-formation.148251/