Check when shield is damaged?

I would like to create a Brigitte change, where hits to her shield will heal her for the amount of damage the shield took. So far however, I only managed to assemble a system which heals when the player is dealt damage while shield is active. (This would result in the incorrect behavior of it being better to activate shield and expose yourself to the enemy instead of covering yourself with it.)

I have also found a forum post requesting barrier entity management which makes me think that this feature is not available. But has anyone managed to find a way around it? To check when a shield was damaged.

rule(“DamageBlock=Heal”)
{
event
{
Ongoing - Each Player;
All;
Brigitte;
}

conditions
{
Player Hero Stat(Event Player, Hero(Brigitte), Damage Blocked) != Event Player.A;
}

actions
{
Heal(Event Player, Event Player, Player Hero Stat(Event Player, Hero(Brigitte), Damage Blocked) - Event Player.A);
Wait(0.016, Ignore Condition);
Event Player.A = Player Hero Stat(Event Player, Hero(Brigitte), Damage Blocked);
}
}

This will set Brig’s damage blocked to player variable A, then when the damage blocked stat changes, heals Brig for the difference between it and A, then sets the variable to her total damage blocked

1 Like

Thank you so very much…
You have opened a whole new world of Player Hero Stats to me… You have no idea how much this means to me. :face_holding_back_tears:

1 Like