MV Remove state on dealing damage

Hello! So I'm using YEPBuffsStatesCore and I'm trying to find a way to make a state be removed on dealing damage. I have a state that guarantees the next hit will be a crit but I cannot find a way to remove the state once the crit lands.
Could you please share a screenshot of your current state? I assume you are using some javascript notetags anyway, so have tried simply throwing the following into there?
JavaScript:
a.removeState(stateId);
I'm not really sure where to state with the note tag. I assume it would be on any attack skill where it would query if the state exists and if the attack hits If both are true it would remove the state. My knowledge of java is not strong so I'm not sure how to accomplish that.
I'm not really sure where to state with the note tag.
Sorry, can you please rephrase that? Im really not sure what you are asking now.
I assume it would be on any attack skill where it would query if the state exists and if the attack hits If both are true it would remove the state.
No, there's no reason to do that - that's the point of you having the Buffs & States Core, you'd put it directly on the state.

You can find a bunch of examples of this in Yanfly's Tips & Tricks.

Code:
<Custom Establish Effect>
user.removeState(id);
</Custom Establish Effect>

where id is the ID of the state.
No, there's no reason to do that - that's the point of you having the Buffs & States Core, you'd put it directly on the state.

You can find a bunch of examples of this in Yanfly's Tips & Tricks.

Code:
<Custom Establish Effect>
user.removeState(id);
</Custom Establish Effect>

where id is the ID of the state.
If the solution was a snake it would have bit me. Thanks again @ATT_Turan. I should learn to read the notes I guess lol

Original thread: https://forums.rpgmakerweb.com/threads/remove-state-on-dealing-damage.150555/