Saturday, May 16, 2020

Bombs Away! Self-Destructing Enemies in RPG Maker MV


Bombs are encountered as early as the first dungeon in Blackmoon Prophecy III, and they do of course blow up in your face if their HP drops below a certain threshold. This was a little tricky to get working in RPG Maker MV. A simple script allowed me to do it in VX Ace, and it was a built-in command in 2000/2003. In MV though, I hadn't the faintest idea what to do. It took a little digging around and combining information from THREE sources to get this to work, since no single method worked for me.

So, here's what I did to get self-destruct working as an ability in MV.

1. Nabbed Yanfly's YEP_BattleEngineCore and YEP_X_ActSeqPack1 scripts and turned them on.

2. Made my self-destruct ability. Set the damage formula, and everything. Only thing I did NOT do was set an animation, because the following took care of that.

3. The following went in the notes for the self-destruct skill:
<Whole Action>
animation X: user
wait for animation
</Whole Action>

<Finish Action>
eval: user.setHp(0)
eval: user.performCollapse();

</Finish Action>

For "animation X", replace the X with the animation of the detonation effect.

No comments:

Post a Comment