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,791
Reaction score
585
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
647
Reaction score
899
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

unintentionally made a track that sounds straight out of Yume Nikki
Revisiting one of my older projects in a long time to work some more on the mechanics. I've been working on- and off-again for about a year now on recreating the Force and Mystic systems from Wild ARMs. And I think I've finally made some good breakthroughs on that!

Still, it is not perfect and I may post my thoughts at a later time to see if there are any other suggestions or alternatives I've missed.
actor name string, why you gotta be case sensitive like that?
Doing RPG Maker News for 26th October 2021

My entire world, full of monsters and treasures, will likely be done by the end of the year. After that it's all NPCs and side quests... then done. I'm never making an open world game again xD

Forum statistics

Threads
116,106
Messages
1,095,846
Members
151,504
Latest member
rensky
Top