function OnTriggerEnter (col : Collider)
{
if(col.gameObject.name == "Portal_Model"); //additional semicolon?
{
yield WaitForSeconds(5) //missing semicolon
{ //random brackets. Not that they are an actual error. It's just a bit weird
Application.LoadLevel("Kino_Dar_Zona");
}
}
}
Based on the [documentation][1]:
Do ();
print ("This is printed immediately");
function Do () {
print("Do now");
yield WaitForSeconds (2);
print("Do 2 seconds later");
}
your code should look like this instead:
function OnTriggerEnter (col : Collider)
{
if(col.gameObject.name == "Portal_Model")
{
DoTrigger();
}
}
function DoTrigger()
{
yield WaitForSeconds(5);
Application.LoadLeve("Kino_Dar_Zona");
}