Making a skill that only works when enemy's HP is below a certain level

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
As the title says...

Is it possible to have a skill that only works when the enemy's HP is below a certain percentage? I tried looking into formulas and such, but I'm smart enough to figure it out.

My main character is supposed to weaken her foe with, then attempt to "instakill" when said foe is weakened.

Thank you for any help.
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
632
Reaction score
848
First Language
German
Primarily Uses
RMMV
Put this into the damage formula:
b.hpRate() < X ? b.mhp : 0

Replace X with the percentage you want.
Example:
0.1 means 10%

So if the enemy has less than 10% health, it deals lethal damage, otherwise it deals 0 damage.
 

Latest Threads

Latest Profile Posts

Doing RPG Maker News for 26th September 2021

Well... it's been a while since I was last here :kaoswt: I don't want to say I'm officially 'back' yet, but I've recently started working with RM again, so I might become active here again :kaohi:
Mmmm I love Coca Cola candy! :kaoluv:
aaaand my power is out. I sometimes think that I'm cursed.

Forum statistics

Threads
115,386
Messages
1,089,503
Members
150,122
Latest member
Sil8nt
Top