YEP Absorption barrier mechanic effect help!

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

  1. Danitinkis

    Danitinkis Deadly and sexy Veteran

    Likes Received:
    A village of the Madrid Community
    First Language:
    Primarily Uses:
    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:
    <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:
    YEP Skill Core:

Share This Page