Umm, I'm having trouble creating a move that damages the user an equal amount as the target, can anyone help me with this? I don't know how to do this. 🙁
How to make a move that damages the player??
RPG Maker MV SupportIf the move you refer is a skill, a plugin like Yanfly's Skill Core will allow you to set the cost of the skill. http://yanfly.moe/2015/10/13/yep-8-skill-core/
I just took a look at it, and I'm not sure if that would help, because the damage taken isn't a fixed number or percentage. The formula is
(a.atk * 4 - b.def * 2) * a.level.
(a.atk * 4 - b.def * 2) * a.level.
I'm not sure if what I'm thinking matches with what you want, but from what I understand you want the skill to return back the same damage the skill deals as a recoil damage. I think that there is a way, but I'll need to do some research on this.
Thank you. Don't worry, I'm not in a huge rush.
This may interest you: https://forums.rpgmakerweb.com/index.php?threads/damage-drain-recoil-rate.48979/
You'll need to insert <dhr: -100> to the skill's note box.
You'll need to insert <dhr: -100> to the skill's note box.
there is absolutely no need for a script or plugin here, just use direct damage coding.
untested, so the syntax for MV might be something slightly different
r defines a new temporary variable named r to store the damage number of whatever formula you want
a.hp-=r reduces the hp of the skill user by r
and you need to set r again as the number for the damage.
This does not reduce damage in case that the target has less HP left, that would make the damage formula a bit more complex by adding a few more commands for comparison and checks.
Code:
r=(damage formula); a.hp-=r; r
r defines a new temporary variable named r to store the damage number of whatever formula you want
a.hp-=r reduces the hp of the skill user by r
and you need to set r again as the number for the damage.
This does not reduce damage in case that the target has less HP left, that would make the damage formula a bit more complex by adding a few more commands for comparison and checks.
Ummm... sorry, I'm new to this. Where do I put the code?
I think you place this to the damage formula box. Make sure to place your current formula between the ().
I put the code in the damage box, and it isn't working. Any other ideas on where to put it?
You could post what you put in the damage box so we could tell if you put anything wrong.
On another note, if you're using Yanfly's Skill Core, you can use this notetag on the skill (no need to replace anything):
<Post-Damage Eval>
user.gainHp(-value);
user.startDamagePopup();
user.clearResult();
if (user.isDead()) user.performCollapse();
</Post-Damage Eval>
On another note, if you're using Yanfly's Skill Core, you can use this notetag on the skill (no need to replace anything):
<Post-Damage Eval>
user.gainHp(-value);
user.startDamagePopup();
user.clearResult();
if (user.isDead()) user.performCollapse();
</Post-Damage Eval>
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-move-that-damages-the-player.81599/