[RMVX ACE] IN-BATTLE COMMON EVENTS KEEP GETTING CANCELED OUT BY ENEMY DEATH, HELP?

Posts

Pages: 1
Hey it's me again \o/

So I've got some weapon unleash skills that work using Yanfly's attack replace and random skill evoke scripts, as well as calling common events to effect users' HP or MP. The skills in question are these:

a) A weapon unless that can cause instant death at the cost of half the user's Max HP
b) A weapon that inflicts normal damage but can randomly heal the whole party (+1/5th of the user's Max HP)
c) A weapon that inflicts triple damage at the cost of 1/5th of the user's Max MP

Which works fine most of the time, but my only problem? If the attack kills the last enemy in the battle, the common event doesn't get called, which means that the HP or MP effect will not occur. This is especially problematic for the 1st skill as the player could get away with all the benefits of the insta-death attack with none of the cost and I obviously don't want that, lol. I tried moving the death status inflict to the common event AFTER the HP blowback calculations, but I couldn't figure out a way to make sure it targeted the correct enemy.

So my question is, is there a way to force the engine to de-prioritize inflicting the death status effect until AFTER the common event is run? Or is there a way to force the common event to run after the last enemy has died?

Thanks :D

EDIT: Nevermind, I figured something out!
Dyluck
For thousands of years, I laid dormant. Who has disturbed my slumber?
5184
Instead of Common Events, consider using Yanfly Lunatic Objects, especially the Recoil add on.
author=Dyluck
Instead of Common Events, consider using Yanfly Lunatic Objects, especially the Recoil add on.


I got this reply JUST after I actually figured out a solution using common events LMAO

what I ended up doing was changing the attack skill for each weapon to a dummy skill to summon the common event, then use a variable to determine which attack to use, and if the conditions are met the HP/MP effect runs BEFORE the attack is forced.

I'll keep that in mind if I want to try this sort of thing again in the future, though! Thanks! (Mods you can close this thread if you want)
Pages: 1