aspdmulti

Villager
Member
Joined
Aug 18, 2021
Messages
16
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
97
Reaction score
85
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
16
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
97
Reaction score
85
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
16
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

aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v
Well, I've got a party tomorrow, and my friends are coming over. I wanted to work a bit on the Fandom Scouts assets so I can be ready when that update arrives... in other news, Pizza Time Horror is getting a second teaser, and it shows Cabaret Helen's last performance before the location closed.
Also who used to be scared of Chuck E as a kid? I was! Now I love him!
The new cards and what they do:

(I am clearly not a youtuber... Haha)

Forum statistics

Threads
117,276
Messages
1,106,056
Members
153,450
Latest member
BRCMuller
Top