Damage Overtime

How do i apply damage overtime to enemies?
Currently, my fire spell only hits the enemy once with no additional damage after the attack.

Hey there @Codename_Prince! There’s lots of ways to go about this implementation, but each of them depend on a myriad of other gameplay factors like:

Can you have other status effects?

Do they interact with fire?

Can the enemy/player be put out/off fire/lose the effect at all?

Does your game need to keep track of this effect or will it have no other relevance outside of just damaging the enemy?

Here’s a super basic implementation, but you’d have to expand it for it to fit inside of a status effect system altogether. I’d usually recommend myself for making a system for damage over time effects altogether, but this serves the purpose standalone:

I like using Actor Components for stuff like this:

image

Any actor this fireball hits will receive 6 Damage, 5 Times per second over 4 seconds Duration. 120 dmg in total or thereabout.

2 Likes