O Ilusionista
Captain 100K
I am trying to adapt DC's tint method to a single didthitscript. It works okay, but I need to set it to expire after some time.
I've tried to use a counter but it doesn't works.
once the entity who applies a didhitscript dies, the damagetaker variable is nullified?
I've tried to use a counter but it doesn't works.
Code:
void main(){
#define EFFECT_TINT_BURN rgbcolor (0, 101, 202) // Burn color.
#define EFFECT_TINT_BURN_MODE 1 // Burn tint alpha mode
void ent = getlocalvar("damagetaker");
int vtime = openborvariant("elapsed_time");
changedrawmethod(ent, "enabled", 3);
changedrawmethod(ent, "tintmode", EFFECT_TINT_BURN_MODE);
changedrawmethod(ent, "tintcolor", EFFECT_TINT_BURN);
if (vtime <= vtime + 200){
changedrawmethod(ent, "tintmode",0);
changedrawmethod(ent, "tintcolor", 0);
}
}
once the entity who applies a didhitscript dies, the damagetaker variable is nullified?