MV Creating a conditional branch for user health in battle?

Hi there. My issue is a pretty simple one. All I want is for an item (Using Yanfly Action sequences in particular), to only effect the user/selected party member if they are below 100 HP. My only issue is I'm not the most familiar with the scripting of RPG maker terms. I know how to check for map ID, Switches, variables, and stuff like that with scripts, but I do not know what script I need to run in order to check the HP of the user/selected ally. I'm probably just not looking hard enough, but I haven't been able to find anyone else with a similar inquiry, on the forum or otherwise. In theory, the code would go something like this:

Code:
<target action>
action effect
if ((script to check user hp)) >= 100
add state 140: user, show
else

end
<\target action>

If anyone could help me figure out how to do this conditional branch I'd really appreciate it. Thank you!
Code:
if target.hp >= 100
add state 140: user, show
end

i use something similar to this for my multi-hit skills to cause it to end the skill if the target dies in the middle of the action sequence.

EDIT: You can change the target to user and it should work just the same.

Code:
if user.hp >= 100
Pretty sure it should be
Code:
if target.hp <= 100
since you want the effect to happen only if they're below or at 100 hp, not above.

You don't want to use user.hp unless your game has only one character, otherwise the effect will only trigger if the user is below 100 hp, no the target of the item.
Code:
if target.hp >= 100
add state 140: user, show
end

i use something similar to this for my multi-hit skills to cause it to end the skill if the target dies in the middle of the action sequence.

EDIT: You can change the target to user and it should work just the same.

Code:
if user.hp >= 100
Ok thank you! Seems to work just fine. I had a problem there with the greater than or less than signs, (I always get them mixed up lmao) but it works just as intended now. thanks again!

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/creating-a-conditional-branch-for-user-health-in-battle.181392/