Quantcast
Channel: Answers for "Problem with countdown timer."
Viewing all articles
Browse latest Browse all 6

Answer by Kashaunzilla

$
0
0

Well in your script your forgot to check to make sure that it is level 6. If its all in one scene then you will need for it to check the level. If it is in 6 scenes then only have the code applied to the character in level 6.

Add this code to your script if you need it only in 1 scene. If it doesnt work then just let me know and i can try and fix it.

add the variable levels

var currentLevel = 1;

Now add a lateupdate

function LateUpdate ()
{
    if ( currentLevel >= 6 )
    {
        startTime = Time.time;
    }
}

Now change your awake function to

function Awake ()
{
    currentLevel = 1;
}

Now you will need to create a update function to check how many things you must to for example how many enemies are left, if 0 start next level but your need to do that on your own.

And thanks kinda of for the countdown code, this should work.


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images