CHAOS17'S PROFILE
Chaos17
![](http://www.warparadise.com/contenu/avatar/22063_chaos.gif)
287
Search
[RM MV] Need a tweak for Yanfly tip and trick : second chance
Hi,
I would like a tweak to Yanfly tip a trick : second chance.
I would like the code check if the target is under 30% HP, it will heal him 10% of his HP.
I understand where to change the part but I don't know the code to calculate that in %.
I would like a tweak to Yanfly tip a trick : second chance.
I would like the code check if the target is under 30% HP, it will heal him 10% of his HP.
I understand where to change the part but I don't know the code to calculate that in %.
<Custom React Effect>
// Check to see if the party is in battle.
if ($gameParty.inBattle()) {
// Sets the flag if the target has more than 1 HP at the time of death.
target._secondChance = target.hp > 1;
}
</Custom React Effect>
<Custom Respond Effect>
// Check to see if the party is in battle, has the Second Chance flag, and if the target is dead with 0 HP.
if ($gameParty.inBattle() && target._secondChance && target.hp <= 0) {
// Play the revival animation.
target.startAnimation(49);
// Set the target's HP to 1.
target.setHp(1);
}
</Custom Respond Effect>
How to unfollow ?
Pages:
1