- Joined
- Dec 31, 2016
- Messages
- 118
- Reaction score
- 65
- First Language
- Spanish
- Primarily Uses
- RMMV
Hi! So im trying to make Overwatch's old torbjörn armor pack effect. So when you gave an armor pack to an ally, it will sum up up to 75 armor to them. If you gave another armor pack to him, it will not sum up to 150 armour because the maximum armor that you can gain from that ability is 75. However, with the workaround I made for making that effect, I could only use that armor gain ability in my game, because I don't know how to treat the armor gained from that ability separetly from other ones. Here is the code i used in the skill notetag:
Here, instead of up to 75 armor I use 20% of target's max health.
Plugins used:
YEP Absorbtion barrier: http://yanfly.moe/2016/02/13/yep-70-absorption-barrier-rpg-maker-mv/
YEP Skill Core: http://yanfly.moe/2015/10/13/yep-8-skill-core/
Code:
<Before Eval>
var maxarmour = target.mhp * 0.2;
var armour= target.barrierPoints();
var gainarmour= maxarmour - armour;
target.gainBarrier(gain armour, 0);
</Before Eval>
Plugins used:
YEP Absorbtion barrier: http://yanfly.moe/2016/02/13/yep-70-absorption-barrier-rpg-maker-mv/
YEP Skill Core: http://yanfly.moe/2015/10/13/yep-8-skill-core/
