YEP Absorption barrier mechanic effect help!

Discussion in 'Javascript/Plugin Support' started by Danitinkis, Jan 27, 2019.

  1. Danitinkis

    Danitinkis Deadly and sexy Veteran

    Messages:
    100
    Likes Received:
    42
    Location:
    A village of the Madrid Community
    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:
    Code:
    <Before Eval>
    var maxarmour = target.mhp * 0.2;
    var armour= target.barrierPoints();
    var gainarmour= maxarmour - armour;
    target.gainBarrier(gain armour, 0);
    </Before Eval>
    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/
     
    #1

Share This Page