I want the state to use let's say 50 mp every turn, and if you have less than 50 mp it gets removed.
How to make a state that uses a specific amount of mp and turns off when you don't have enough mp?
RPG Maker VXAce SupportUsing VisuStella's States and Skills Core:
<JS Pre-Regenerate>
target.gainMp(-50);
if (target.mp < 50) target.removeState(state.id);
</JS Pre-Regenerate>
<JS Pre-Regenerate>
target.gainMp(-50);
if (target.mp < 50) target.removeState(state.id);
</JS Pre-Regenerate>
Just to confirm - which engine are you asking for? You're posting in MZ support, but your profile says you use VX Ace. You'll get very different answers.
Yeah I'm asking for vx ace, my bad I thought I was posting in vx ace support.
Lunatic States
Last Updated: 2012.01.30 Download Link Github Link FOR ADVANCED USERS Lunatic mode effects have always been a core part of Yanfly Engine scripts. They exist to provide more effects for those who wa…
I've moved this thread to VXAce Support. Thank you.
I'll check this out, thanks.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-state-that-uses-a-specific-amount-of-mp-and-turns-off-when-you-dont-have-enough-mp.145762/