aspdmulti

Villager
Member
Joined
Aug 18, 2021
Messages
15
Reaction score
5
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
Veteran
Joined
Mar 29, 2020
Messages
89
Reaction score
81
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

Villager
Member
Joined
Aug 18, 2021
Messages
15
Reaction score
5
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
Veteran
Joined
Mar 29, 2020
Messages
89
Reaction score
81
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

Villager
Member
Joined
Aug 18, 2021
Messages
15
Reaction score
5
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

I'm just so close to replacing LUK with a different stat, maybe DEX but we'll see.
Slapped together a title screen and working on some dungeon clutter + portraits for Dubhghaill and Einar. Usual CW for minor body horror wrt Einar
QVLJIgD.png

OaPcYUy.png

r55FiUJ.png

EIgO94y.png
cT1V4nb.png
>studying for months for an exam
>does exam
>waits 3 months for the results to come out
>me trying to login, incorrect password
>I get recovery password
>me trying to login, incorrect password

What the heck. As a son of a Karen, I'm going to file a few complaints.
Apparently Amazon Prime users get free Genshin Impact stuff like primogems and whatnot every month, but I'm not sure I ever want to fall into the abyss of F2P ever again.

Forum statistics

Threads
117,148
Messages
1,104,951
Members
153,221
Latest member
Kostec
Top