I already made my DoT damage function work and apply damage as intend.
This is my logic: cast a fireball >> fireball hit >> spawn an actor and attaches to hit target >> this actor deal damage on time to target and “destroy” when expired.
However, I want to make it work like: a newer dot will replace the elder one, currently my logic will make dot stacking on target since I can attach many actors on the hit target.
BTW: I have different skills that can apply dot, and I only want this replace mechanic happen on dot from the same skill (i.e fireball dot won’t affect a poison dot), but the problem is that I use the same actor to apply dot damage, should I start from try to give my “dot actor” a variable to track which skill and which player cause damage? Or should I create individual dot actor for each skill I have?
Hey Wang,
you could write an ActorComponent (GetDoTComponent) which applies Damage over Time to an Actor which has a HealthComponent attached to it.
All logic will be handled in GetDotComponent (
Members:
float Damage
float Time
float Delay
Functions:
SetVars(float Damage, float Time, float Delay)
ApplyDamage() //Called by the TimerHandle
If a Pawn (which has the GetDoTComponent attached to him) will be hit by a spell, you call ApplyDamage with the Parameters the Spell provides. ApplyDamage should check first if the TimerHandle (Member of DotComponent) is still playing. If it is, you reset it and apply damage with your new Parameters
This was my first thought how about applying damage over time 
Maybe theres a more elegant way
Greetings 
thanks for your reply.
But I have another question.
So the “GetDotComponent” is attached to target? (i.e. a test target)
Then how to apply multiple dot at one time (from different skill)?
Well I think I solve it…I had the right logic but made a small mistake.
Thanks for your reply anyway. XD
It’s just an ActorComponent (which is attached to a Pawn/Actor with a HealthComponent) which has to have a Reference to the HealthComponent to apply the Damage to it 
But since you fixed it everythings fine 
Greetings