Stackable state, that gradually disappears after an attack

I tried to look around a bit, found nothing, so let me just get straight to the point. I made skill that applies state X in stack of 3, and it's supposed to go away 1 by 1 after your each hit. So you do 3 hits, and it goes away. Question is, how do I make it in stack of 3, and how do I make it get lower by 1 after actor hits something? Thanks in advance.
Not to come across as snarky or anything, but after the whole thread earlier today (and apparently another similar thread?) and looking through the notetags in the documentation for the plugins you own, you couldn't come up with something to try?

See if it works, and if not put it here and go "can you help me fix this?"

Especially the first part, "how do I make it in stack [sic] of 3," there's no reason you shouldn't be able to do that based off of the code you've already been given.
I had an idea to try, but then I realised I have to make game realise "ok I should deplete 1 stack after attack", and considering that stack is probably going to be done through plugin, I realised that even if it's possible to be done on my own, it would require elaborate common event scheme, so I decided to post this, just in case it can be done much more easily (tbh that's mostly the reason I post early, because people far more acknowledged than me can give me the most optimal solution, otherwise I just keep searching of methods and trying on my own)
You've been given several solutions using notetags in your states from VisuStella's Battle Core. You might read through them to see which happen after a skill resolves (there are several).

I don't think it makes sense to resort to an elaborate common event when everything else has been 1-2 lines of code in a notetag.


Anyway, I'm not here to rag on you, I'm sure someone will be happy to provide the code for you.

Good luck, yo.
I made skill that applies state X in stack of 3
Question is, how do I make it in stack of 3
What have you done so far? you said you made the skill to apply the state in 3 stacks already, but then ask about how to do it.

This new state and the ones from the past are going to be largely the same. the only differences are that Itll start your stacks at 3, decrement them when you act instead of incrementing them on application, and then do something at 0.
You've seen the tags to do these already, so give it a shot. if you get stuck and what you put together doesnt work as intended, share it and you can be shown what when wrong, why, and what to do to correct it. youll make less threads about making similar effects and be able to have your effects made faster in the long run by doing it
What have you done so far? you said you made the skill to apply the state in 3 stacks already, but then ask about how to do it.

This new state and the ones from the past are going to be largely the same. the only differences are that Itll start your stacks at 3, decrement them when you act instead of incrementing them on application, and then do something at 0.
You've seen the tags to do these already, so give it a shot. if you get stuck and what you put together doesnt work as intended, share it and you can be shown what when wrong, why, and what to do to correct it. youll make less threads about making similar effects and be able to have your effects made faster in the long run by doing it
Sorry, bad wording, my bad. I just wanted to simply that it's a skill, that implies 3 stacks of state, not that I done it.
I guess I can try, but I am suspicious about "depleting when act", since I need it to deplet on actor doing a hit, not any skill.
I guess I can try, but I am suspicious about "depleting when act", since I need it to deplet on actor doing a hit, not any skill.
in the last state, a check was put in it to make sure that the current skill being used deals damage before executing its effect. you could start there if it helps
So, currently, I found nothing on state stacking that would help. Mostly because it's a state, that has to be at count of 3 from beginning and doesn't deplete. Currently I have no idea how to make game display count, and that's troublesome (in meantime I got an idea that I could use turn count for it, if I could stop turn count from going down on that state, but searching for topic like that was unsuccesful too). All topics I found on that were rather about other stuff, so that was no helpful too. I will be editing that post later, if I find anything useful.
Edit: Okay, I just have no idea what to do. It requires JS, and I have 0 knowledge on it. I guess I'll just go do some other stuff on game, and bump that after a week or so.
Bump.
Bump.

Original thread: https://forums.rpgmakerweb.com/threads/stackable-state-that-gradually-disappears-after-an-attack.163454/