RPG Maker MZ Skill attacks then attacks again 2 turns later.

Second time I'm asking something here (sorry), so I'm trying to make a skill which first attacks the ennemy, and then 2 turns later the ennemy gets attacked again. Basically an attack and a delayed attack. I've tried to use common events, states, etc, and Visustella MZ's plugins, but I can't find anything.
If I'm not being clear enough, I can explain in more detail if needed.

Man using this software is hard
Don't apologize for asking questions. That's what the support forums are for.

Anyway, my initial thought on solving this (if you happen to use the VisuStella suite) is to make your first attack inflict an enemy with a state, adding a notetag to that state to have it deal damage upon removal.

Kinda busy atm, so give me a bit to clarify what I'm talking about, unless someone gets to it first or comes up with a different idea.
This area is what you should take a peek at in particular @FlatWan



Link will take ya straight to a note tag set up ^
Don't apologize for asking questions. That's what the support forums are for.

Anyway, my initial thought on solving this (if you happen to use the VisuStella suite) is to make your first attack inflict an enemy with a state, adding a notetag to that state to have it deal damage upon removal.

Kinda busy atm, so give me a bit to clarify what I'm talking about, unless someone gets to it first or comes up with a different idea.
aha ! I knew one of those plugins was gonna be useful, that's exactly what I needed ! just gotta figure out how to do it
Thanks, @Puppet Knight. Was just about to get back to this.
This area is what you should take a peek at in particular @FlatWan



Link will take ya straight to a note tag set up ^

thank you for the shortcut, just gotta figure out how to code it in JavaScript I guess ? I'm assuming I have to code it after <JS On Erase State> in a note tag in a state, don't know how to do it but I'll try
If you just want them to take damage, you'd use target.gainHp(negative value here)

You could show an animation on them with target.startAnimation(ID)

The pinned script call list should help with finding the syntax for little things like this.
If you just want them to take damage, you'd use target.gainHp(negative value here)

You could show an animation on them with target.startAnimation(ID)

The pinned script call list should help with finding the syntax for little things like this.
Okay the idea is there, right in front of me, with the google docs and all, and yet I'm stuck on ONE stupid little thing
I want them to take damage after the state has ended, but the damage needs to be based on one of my actor's atk stat, I've got a common event getting it and turning it into a variable, and it works, but I don't know how to put it in JS, oh and I don't know what I'm doing with the animation thing I just put something random to test
it looks like this right now


<JS On Erase State>
target.gainHp(atk_stan)
target.startAnimation(1)
</JS On Erase State>


I've never used Java so I have no idea what I'm doing,
I've only used python so I'm kinda guessing stuff
Help java script is scary
Update: I've just done this instead:
<JS On Erase State> target.gainHp(($gameActors.actor(3).atk) * (-3)) target.startAnimation(2) </JS On Erase State>
I still don't know how to put in a variable or how animation works since 2 also doesn't do anything but I'll recheck the google doc
Update: I've just done this instead:
That doesn't seem like what you want to do, unless actor 3 is the only one who can use the skill.

Why not just set it to a variable? You can do that in the damage formula of the skill: v[5]=a.atk will store the attacker's ATK in variable 3.

I can't tell you why that wouldn't work to display the animation.
The script call list says that:
target.startAnimation(X)
is for MV.

For MZ it says to use:
$gameTemp.requestAnimation([target], X)
For MZ it says to use:
Thanks! I never noticed they changed that function call. Makes sense, since they changed the animation system.
That doesn't seem like what you want to do, unless actor 3 is the only one who can use the skill.

Why not just set it to a variable? You can do that in the damage formula of the skill: v[5]=a.atk will store the attacker's ATK in variable 3.

I can't tell you why that wouldn't work to display the animation.
fortunatly only the 3rd actor can use this skill so this works, but it's still nice to know !

The script call list says that:
target.startAnimation(X)
is for MV.

For MZ it says to use:
$gameTemp.requestAnimation([target], X)

thank you ! I'll try it out

Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-mz-skill-attacks-then-attacks-again-2-turns-later.160373/