- Joined
- May 31, 2017
- Messages
- 51
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
Yes, both Core plugins work together to create the damage formula.Hm... that's... actually not a bad idea~!
I will try that out immediately~!
~ Dragon
Edit//: Er... how... do you make it so you can choose either ally or enemy your target?
Ooh... wait, it's the core thingy, isn't it?
for (var i=0; i < $gameParty.members().length; i+=1) $gameParty.members()[i].gainHp(Math.round($gameParty.members()[i].mhp * 0.25)); yourDamageGoesHere
That's because he only wants the healing to trigger once, whereas your formulas trigger it more than once unless there's only 1 enemy, which he doesn't want to happen. Also, your formula will count each enemy which, by my understanding, should not happen as it will heal each actor a number of times equal to the number of enemies hit.There is something I don't understand...why don't you use damage formula for something so simple instead of using tons of plugins? I really think you are making things way more complicated than they actually are. Using plugins is nice and useful when they are actually needed. Using them for something that the engine can do on its own just complicates things and requires extra bug-hunting and testing.
Using a for loop in your damage formula is enough for that. MV damage formula allows you to use many characters so you can do amazing things there. There is no need to use and configure plugins at all here.
How it works:Code:for (var i=0; i < $gameParty.members().length; i+=1) $gameParty.members()[i].gainHp(Math.round($gameParty.members()[i].mhp * 0.25)); yourDamageGoesHere
It scans each party member and heals for 25% of max HP. The last part should be your real damage formula. It can be the default attack formula a.atk * 4 - b.def * 2 or anything.
If you want you can allow enemies to use this skill as well but then you need a check to decide if you have to heal enemies or allies.
You're right, I totally missed the fact that he was targeting all enemies at once. I am sorry for that. However there are ways around. You could, for example, target a single enemy and use the damage formula to deal damage to all of them (except the target because that one is going to suffer damage from the actual attack). An other option would be to trigger a switch when you actually use the skill and use that very switch to deal damage. If the switch is true/false (depending on how you want to handle this) you heal, if the value is the wrong one (this means you already healed your party) you only deal damage.A for loop before the damage will trigger the loop on each enemy before the damage is done.
That's why I posted the solution I did, even if it might have been a bit much. The only way (that I'm aware of) to get a "targets all enemies with effect A, then targets all allies with effect B" is to invoke a script call using a part of the overall action sequence that only fires once.But I have discovered a slight problem with the skill testing that out. It heals for each enemy hit... and not once for the skill being used...
I may have to get rid of the healing factor, but any suggestions would be a great help.
~ Dragon
