How can I apply damage so that a character will take slight damage over a certain amount of time?

Hey everyone,
I have a blueprint that I’m working on that has two different variables that decrease over time. My goal is to make it so when either variable hits 0 the Player starts to take “damage” every few seconds. The part that I’m not sure of is the “Apply Damage” function that I call when the variables are empty.

Right now I have the Damaged Actor set to Player Character. However, I’m not really sure what this does. I can’t seem to find anything that references my players “Health” so I’m not sure what is actually happening when “Apply Damage” triggers.

Hey Paradodx,

Which Blueprints are you working from, is this all in one Blueprint or are you interfacing?

I’m sure there’s probably another way to do it, but here’s how I did it below in my character Blueprint:

First image checks variable Timer1 every tick and counts down from 5 until reaching 0 at which point it branches and starts to apply 1 damage every 1 second (when Timer2 is true).

Second image handles the actual damage applied to the player character where I’m subtracting from my variable Health.

Should give you some ideas on where to go. Hope it helps.

-W

This makes sense now. I was a little confused by the reference to “damage” as it made me assume then there must be some pre-configured reference for “health”. I see now though that its a simple float variable that you add and subtract from. Which is basically how I was already handling health. Now I understand how damage can be used to effect that variable. Thanks!