Topic: Change incoming damage

Is it possible to change the incoming damage done to a player? I want my character to have a shield that would reduce the amount of damage they take while the shield is active and I have been trying to get it to work using the OnHit function, so that when my character is hit, I change the amount of damage done. Would it be better for me to change the amount of damage before it does connect? So like when any move is called from the opponent, change the _damageOnHit or _damageOnBlock amounts before the move hits the player with the shield?

Share

Thumbs up Thumbs down

Re: Change incoming damage

I dont recommend modifying _damageOnHit or _damageOnBlock via code due to them being on scriptable objects.
You can instead modify the lifepoints of the character directly.

 UFE.p1ControlsScript.currentLifePoints -= 10;

Share

Thumbs up Thumbs down