How can I make my level load after a delay of 5 seconds without pressing any button.
- Felipe
How can I make my level load after a delay of 5 seconds without pressing any button.
Invoke( “Load”, 5 );
function Load(){
LoadLevel(...);
}
function LoadLevel (levelname : String)
{
yield WaitForSeconds(5);
Application.LoadLevel(levelname);
}
when u want to load level call this function like
LoadLevel(“menu”);
var timeLimit : float = 5; // 1 minute timer
Invoke(“NextMap”, timeLimit);
function NextMap() {
Application.LoadLevel(Application.loadedLevel + 1); //current level is 1
}