aspdmulti

Regular
Regular
Joined
Aug 18, 2021
Messages
36
Reaction score
9
First Language
Bahasa
Primarily Uses
RMMV
I want to make a skill where 1 monster give it's hp to another monster equal to it's max hp, then the user die in the process. Is this possible ? If it's possible, then how do I achieve this? For your information I am using yanfly battle core
 

AphoticAmaranth

An Ordinary Human
Regular
Joined
Mar 29, 2020
Messages
476
Reaction score
962
First Language
English
Primarily Uses
RMMV
If you're using Yanfly Skill Core you can use

Code:
<Post-Damage Eval>
a.gainHp(-a.mhp);
a.performCollapse();
</Post-Damage Eval>

to kill the user of the skill.
 

aspdmulti

Regular
Regular
Joined
Aug 18, 2021
Messages
36
Reaction score
9
First Language
Bahasa
Primarily Uses
RMMV
Cool
If you're using Yanfly Skill Core you can use

Code:
<Post-Damage Eval>
a.gainHp(-a.mhp);
a.performCollapse();
</Post-Damage Eval>

to kill the user of the skill.
Cool I'll try it. Okay what about if I want the user give certain value of hp, and die if the value higher than its current hp ?
Ex : user have 1000 HP. The skill cut his HP by 600. So if the user use the skill for the 2nd time, then it dies
 

AphoticAmaranth

An Ordinary Human
Regular
Joined
Mar 29, 2020
Messages
476
Reaction score
962
First Language
English
Primarily Uses
RMMV
In that case just replace the a.mhp with the amount of HP you want them to lose and only run the collapse effect if that would kill them.

Code:
<Post-Damage Eval>
a.gainHp(-600);
if(a.isDead())
{
  a.performCollapse();
}
</Post-Damage Eval>
 

aspdmulti

Regular
Regular
Joined
Aug 18, 2021
Messages
36
Reaction score
9
First Language
Bahasa
Primarily Uses
RMMV
In that case just replace the a.mhp with the amount of HP you want them to lose and only run the collapse effect if that would kill them.

Code:
<Post-Damage Eval>
a.gainHp(-600);
if(a.isDead())
{
  a.performCollapse();
}
</Post-Damage Eval>
Problem Solved. Thanks !
 

Latest Threads

Latest Posts

Latest Profile Posts

The X-Mas and ~ all ~ December long Calendar Project seems to bring my machine right to the limit. A very good oportunity to test what my pc can do. Or at which point I should decide to take a step back from filling the rendering program with assets.
The new grafics card and ram do their job well, that's for sure. My own early Christmas gifts were a good investment.
my laptop keyboard gave up, they keep glitching out, it seems like it's time to finally replace them, honestly surprised it lasted this long.
Tiny setback. Turns out my Title Screen image and one of my primary background & avatar images are AI Generated. Glad I went back and checked all my resource links. So I am in hot pursuit of replacement images. Which is fine since I was still missing some images that I need anyway.
Watching Vibrato Chain Battle System is too awesome! watch I wish had this gfx and animation skill to make such game!
Got drawn back by a notification about QPlugins. For those who want the MZ versions I was using, they're on my Github. https://github.com/ImaginaryVillain/QPlugins I literally don't care what you do with them, have fun! :LZSlol:

Meanwhile.. I'm glorying over these 550 new Victorian house models Epic gave me this month. See next post for examples....

Forum statistics

Threads
136,892
Messages
1,271,117
Members
180,670
Latest member
jakkapong
Top