How do I make it where when people die they dont have 10 seconds after going into flags?
-
So I have a code where people can go into flags but they have 5-10 seconds before they die, but when they die it still kills them as if the 5-10 seconds wasn't over. and I wanna remove that, like when they die it doesnt kill them it removes the counter. cause every flag they go into it just kills them every time they go into the flag and go for a shot and I really wanna remove that.
-
Scripto Feel free to share a code snippet, though it sounds like you just want to kill the thread responsible (for killing the player after X amount of time) on player death.
-
self WaitUntilEvent(10, ::IsAliveWrapper, ::SuicideWrapper); IsAliveWrapper() { return isAlive(self); } SuicideWrapper() { self suicide(); } WaitUntilEvent(time, function, do) { self endon("disconnect"); while(time > 0 || self [[function]]() == false ) { wait 1; time--; } self [[do]](); }
here is the code. I'm trying to just make it where when they go through flag and go for a shot before timer is up it get rids of the timer. It does kill them after 5-10 seconds even AFTER they go for a shot.
-
SOLVED!