How to apply damage to main character (player) in Action RPG sample

So I am trying to make my own game, and I have been following the structure/setup of the Action RPG sample project provided by Epic. I find the sample project and documentation very helpful, and I am trying to understand it as best as possible. As I have understood, this is the way to go for most games, and many of the functions in Action RPG is actually in use by Fortnite.

But unfortunately, now I am completely stuck. I want to make the player damaged by traps I have placed in my world, but I have no idea how to apply damage to the player via the Action RPG “abilities” system. If I create a collision box, and the player is overlapping the box, how can I make the player lose health when the overlapping event is triggered?

I know this is very specific to the Action RPG sample project and the recommended “abilities” system, but I hope somebody has the time to help me with this, as I am eagerly awaiting answer to this question :slight_smile:

PS: My project is both c++ and blueprint (same as Action RPG sample project)

It was not so difficult after all. Just added a ReduceHealth(float amount) function to RPGCharacterBase class which is UFUNCTION(BlueprintCallable) that sets a new health by calling AttributeSet->SetHealth(newHealth); and then make a Custom Event in the BP_PlayerCharacter that calls the “Reduce Health” function in RPGCharacter Base. Then you just have to call “Get Player Character BP” and call the “Reduce Health” function from whichever blueprint you world like. Works like a charm :slight_smile: