RPG Maker Forums

Hello,

I'm trying to set up a spell that deals health damage, but if the target has mana left (more than 0). the spell will first try to deplete that mana and then move on to deal damage to health.

At the moment this is done by just setting b.mp to a specified value in the damage formula, but this leads to some messy game messages.

In particular if the target has more mp than the amount of damage the spell would do, the game treats it as if the spell didn't do any damage.

To clean this up I want to make my spell 1 (that deals hp damage) force the character to cast a second spell that deals damage to mp.

(the amount can be stored in a global variable easily enough)

But I'm having trouble getting my character to actually cast that spell.

I'm currently using this bit of code to try and make my character to cast the second spell (spell 6)

a.force_action(6, -2)

But all it does is make the character repeat spell 1, that is supposed to trigger the second spell.

Clearly I'm doing something wrong here.

Is there anyone who could help?

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top