Hey !
Im working on a tower defense game.
And I'd like some of my towers to apply a BURN / POISON effect.
I need a little help on how to structures the function...
right now when PROJECTILE hit ENEMY i start the function enemy.EFFECT()
func effect(effect_type,effect_amount,effect_time)
Effect type : 1 2 3 4; 1 = damage over time. 2,3,4 are other system (speed debuf etc..)
Effect amount (in our case) : The total damage to deal.
Effect time : how long does it last. (in secondes)
(so i can basically take the dmg and divide it by time to know every "tick" time)
Alright,
so now im here... And my challenge is the "double timer". Because one timer needs to make the effect last, let's say 8 seconds. And the other one needs to TICK every X seconds and apply the dmg.
So... 2 timers ? node timer or delta timer created directly in the script ?
Then, once the "status" is applied, if the same effect is applied, i want to reset the timer and dmg to the original stats. - this part won't be hard.
how would you proceed with the timer situation ?
Someone recommended me to create a unique scene for each debuff and give_parent to the ENEMY.
thx !