Small but specific question, i have a script call where I deal damage to an enemy with code "gainHP(-30)". This works, but I want to change it so the damage is equal to the M.Attack stat of the attacker (always only have 1 character in the party, so character 1 i guess?). How can I do this?
Deal damage equal to character M.Attack through script call (MV)
RPG Maker MV SupportSo is this in battle or outside of battle?
You could use a Variable to deal the damage and get the number by "Control Variables" Set, Game Data, Actor, M.Attack?
You could use a Variable to deal the damage and get the number by "Control Variables" Set, Game Data, Actor, M.Attack?
try
Code:
gainHp(-$gameActors.actor(x).mat)
That code you typed won't work - it's Hp, not HP.
If you always only have one character in the party, it'd be
If you always only have one character in the party, it'd be
gainHp(-$gameParty.members()[0].mat)Thanks everyone, @ATT_Turan's example works perfectly. I have an action battle system and the damage is for a slip damage state to enemies, based on the player's M.ATK stat, works now 🙂
Original thread: https://forums.rpgmakerweb.com/threads/deal-damage-equal-to-character-m-attack-through-script-call-mv.174191/