How can I stack hp regeneration?

Depending on how far your need to takes this, here’s an idea with the above-mentioned actor components:

  • a bunch of potion effects inheriting from the base:

image

  • when we drink, a potion effect is spawned on the player (Add Component by Class):

  • the regen potion doing its thing:

You can now have any number of effects affecting the player and tracked independently, and each takes care of itself. If necessary, the player can look them up at any time:

image

Perhaps receiving a critical hit cancels regeneration and you want to get rid of active effects. You can also take it much further by creating entities containing multiple configurable effects.

Good luck!

2 Likes