Trying to create a Formula

So after repeatedly trying to make a state be added if a critical hit is taken by the actor I still cannot get it to work.


I'm currently using Yanfly's Plugins for the passive states, and his buff and status core, and the absorption shield. I have two passive states set up. One which is always on the character so if he receives a critical hit on himself its supposed to add another state which would be the shield worth 30% of his Max HP for 2 tunrs. However, I cannot figure out the correct string to add to the passive states notebox. If anyone has any tips or tricks please let me know.
I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.



Please give links to the website of the plugins you're using, and post a screenshot of what you have tried to do so far - this will speed up the answers.
Hi,


Here the little code made for my scythe :


<Custom Confirm Effect>
// Check is the hit is critical
if (target.result().critical) {
    // If it's critical, oneshot the target by giving her the death state
    target.addState(1)
}
</Custom Confirm Effect>


This made with YEP_BuffsStatesCore and YEP_AutoPassiveStates.


Hope that's help.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-create-a-formula.66765/