- Home /
advanced countdown timer help please
i have basically designed a small game and would like a timer of 5 minuets to start up in the top right corner of the screen at the start of every level. i would also like this timer to record points for the player, if they complete the level with 4mins to spare they'll collect 400 points, 3mins to spare, 300 points, 2mins, 200 points and 1 minute to spare 100 points i would also like this timer to state game over and go back to the previous level to restart. i have been looking at numerous different codes and styles for weeks but i cant seem to make it do all this successfully. please could somebody help? any suggestions would be great
i have this as my coding right now. but i know its wrong and all its ai$$anonymous$$g to do there is count down 5 $$anonymous$$s then take me to the end level. it still doesnt include the points scoring.
private var timer:int = 0;
function OnGUI() { GUI.Label("Timer"); } var myTimer : float = 300.0;
function Update () { if(myTimer > 0){ myTimer -= Time.deltaTime; } if(myTimer <= 0){ loadLevel("end"); } }
Your answer
![](https://koobas.hobune.stream/wayback/20220613084155im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Timer not work :( 0 Answers
Countdown Timer Help About putting 0's 1 Answer
Timer counts down unwanted 2 Answers
How to stop a timer with GUI button? 1 Answer