RPG Sample Game

[=;288904]
How to deplete mana while being attacked while blocking?
I just bought the rpg toolkit and I’m trying to change some stuff. I need the mana to reduced while I’m being attacked while blocking and not able to block without mana. Does anyone know how? Help would be highly appriciated.
[/]

To drain mana while blocking just locate the TakeDamage function in the RPGCharacter blueprint and add this:

That way, 10 mana is always reduced when blocking while taking damage. For not being able to block without mana you could go for a few different approaches. E.g. you could prevent the player from blocking at all (have a look at the “InputAction SecondaryAttack” in the “EventGraph_Combat”) or you can let the player do the block animation but reduce the health even when blocking (you need to change the first branch node in the “TakeDamage” function).

Hope this helps!