I am using a script called ChangeScript attached to a box collider to try and change scenes, this is the script:
function OnTriggerEnter (other : Collider)
{
if (other.tag = “player”)
{
Application.LoadLevel (“Bunker”)
}
But when I try to use it, it says “Script ChangeScript has not finished compilation yet.” even though I’ve waited for around 10 mins. What am I doing wrong?
Ah! I had the same problem. I think i know what to do.
This has nothing to do with time. There has to be an error like a missing semicolon
or somthing like that.
You have to care about any errors or problems before you can attach a script to an Object.
And just an idea, you could use this if you want:
function OnTriggerEnter (collision:Collision) {
if(collision.gameObject.name=="Player"){
Application.LoadLevel("Bunker");
}
}
If you want to use this script the name of the player-object has to be “Player”
I hope my answer will help you =). If it’s not working, feel free to response.