Why does Unity want a } at 8/9 and want EOF at 22/9? All I did was add “private” to the variable. Thanks as always.
var walls : GameObject;
var animationStopped : boolean = false;
var Mineshaft: AudioSource;
var Halt: AudioSource;
function Start () {
private var aSources = GetComponents(AudioSource);
Mineshaft = aSources[0];
Halt = aSources[1];
animation.Play();
Mineshaft.Play();
yield WaitForSeconds (animation["Elevator_Move"].length);
animationStopped = true;
}
function Update () {
if (animationStopped) {
Mineshaft.Stop();
Halt.Play();
Destroy(walls);
}
}