MV (SOLVED) (Yanfly) How do I reference a state's owner's current mp inside the state's notebox?

I currently have all Yanfly plugins and am attempting to add an additional penalty to an actor for being knocked out. In this case, I am trying to have the actor lose all their mana when they are knocked out, but I am having difficulty figuring out how to reference the owner of the KockOut state's mana (id 0001). How do I do this?
Moved to: Plugin Support
I'm not sure from the wording of your question whether you're not sure how to reference the person that has a state ("user") or how to reference an actor's mp (".mp").

Either way, you'd simply put the notetag into your Knockout State:
Code:
<Custom Apply Effect>
user.mp=0;
</Custom Apply Effect>
mp is a read-only property; use setMp or gainMp to change the value, e.g. one of these:

<Custom Apply Effect> user.setMp(0); </Custom Apply Effect>
<Custom Apply Effect> user.gainMp(-user.mmp); </Custom Apply Effect>
Oops! Thanks.

Incidentally, you just fixed a bug I didn't know I had in my boss battle entry 😉 🤣
You're welcome! 👋

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/solved-yanfly-how-do-i-reference-a-states-owners-current-mp-inside-the-states-notebox.140991/