Hi, I want to make a spell that heal 50% of the actor's HP when he kill an ennemy with this spell. How can i do ?
Spell that heal HP on kill
RPG Maker MV SupportYeah, that is a tough one. 😛 The fact that you have the caster and an enemy both be the target of the same spell, makes it a bit harder... But it is absolutely not impossible, so lets figure this out together.
First of all, to make things easier, you might want to use some plugins. I would strongly recommend Yanfly's plugins for this. If you are using SV battlers, than the ActionSequences plugin from that series would be great to do this.
Do you have/use thise plugins by any chance?
First of all, to make things easier, you might want to use some plugins. I would strongly recommend Yanfly's plugins for this. If you are using SV battlers, than the ActionSequences plugin from that series would be great to do this.
Do you have/use thise plugins by any chance?
Thanks for the reply! I use a lot of Yanfly plugins but not the ActionSequences one. But i can add it if it helps.
If you have it. This is not a free plugin, I believe. But if you have once bought the whole yanfly set, those should be included.
The thing is, those plugins are a bit overkill for only doing an effect on kill. If you use them already, it would be a great way to figure this out. If you don't use them, then it is like trying to jam in a nail with a sledge hammer. 😛
The thing is, those plugins are a bit overkill for only doing an effect on kill. If you use them already, it would be a great way to figure this out. If you don't use them, then it is like trying to jam in a nail with a sledge hammer. 😛
Ok I understand. Here is all the Yanfly plugin I use if it can help. Even if it's overkill to use Actionsequences i'm ready to use it if it's the easiest way. But I hope there is another way.
you should reorganize your plugins. if you dont follow the order as its shown on the website youre likely to run into issues stemming from load order sooner or later
you can use the skill core for it. put this in the skill's notebox and it should do what you want
Code:
<After Eval>
if (target.hp == 0) {
user.gainHp(Math.ceil(user.mhp/2));
user.startDamagePopup();
}
</After Eval>
thanks it worked ! I will also change the order of my plugins.
The order of upur plugin is important, but if it works, it works.
For yours I had all the cores on top and all the addons on the bottom. That worked just as well.
But some plugins should always be above plugins that depend on it. Addons for the battle go under the battle core and addons for items go under the items core. How far under, that shouldn't matter.
The order is important, but there is not only 1 right order. If it works, the order is fine.
(Edit: Fine is an over statement. Using the given order would minimalize the risk when adding more plugins.)
For yours I had all the cores on top and all the addons on the bottom. That worked just as well.
But some plugins should always be above plugins that depend on it. Addons for the battle go under the battle core and addons for items go under the items core. How far under, that shouldn't matter.
The order is important, but there is not only 1 right order. If it works, the order is fine.
(Edit: Fine is an over statement. Using the given order would minimalize the risk when adding more plugins.)
Original thread: https://forums.rpgmakerweb.com/threads/spell-that-heal-hp-on-kill.168438/