- Home /
Game automatically loses before the timer starts
The CountdownTimer script I wrote works, but I'm guessing since currentTime <= 0, the timer never makes it to 0 because the “else” will automatically take the player to the “GameOver” scene. I'm trying to figure out how to have the Timer continue counting down until the player is killed off and/or makes it to the final count down? I have a script written for if the player falls off the platform, the "GameOver" scene will be loaded. However, if the BadGuys explode and kill the player, he dies but nothing happens. I know the "BadGuy script" has to be involved in this but I am completely stomped on what to write for that...
Answer by highpockets · Mar 12, 2021 at 07:33 AM
That else
should be else if(playerDead)
. You just need access to the player class and define when your player is dead
Your answer
Follow this Question
Related Questions
Reload level after timer hits 0 1 Answer
how to timer count down and then count up 0 Answers
How to make reverse countdown timer in unity? 1 Answer
CountDownTimer Help 1 Answer
Timer Continues After Object is disabled 2 Answers