Store enemy HP as a variable for Absorption Barrier

Hello,

What is the command code for storing an enemy's stats as a variable? I saw it here once but I have lost the thread.

I need it for Yanfly's Absorption Barrier. I want a skill that Barriers you using the enemy's HP. (I also want it for other skills)

Thanks in advance
What is the command code for storing an enemy's stats as a variable? I saw it here once but I have lost the thread.
depends a little on where youre running it. if its a yanfly notetag then most likely you want either $gameVariables.setValue(x, target.hp) or $gameVariables.setValue(x, user.hp) depending on which and replace the x for the variable's id
I'm not sure why you need/want a variable at all.

If you have a skill that's targeting an enemy to take their HP as barrier points, you'd just give it a Skill Core notetag with
Code:
user.gainBarrier(target.hp, 0);
Thank you both, Robro and ATT

This is resolved now
This thread is closed due to being indicated as solved. Report the next one so we can see! If you need this one reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/store-enemy-hp-as-a-variable-for-absorption-barrier.174290/