Hi,
I am doing a hang glider game, whereby there's 5 rings in a terrain and the objective of the game is to fly through all the FIRST 4 rings first before you can go on to the 5th ring which will then load a new scene(A fast video and then a LEVEL Completed page )
I am currently having only one problem.
My hang glider can detect all individual rings i go through however, how do we set it up so that the NEW SCENE(video...) will only load IF I went through all of the FIRST 4 Rings, not any less. I Tried using public/static var and etc but it wont work as there's an error saying Unknown Identifier.HELP!!!
This is my current script for each of the first 4 ring
var airplane : GameObject; var Ring : GameObject; var ringscore1 : boolean;
ringscore1 = false ; function OnTriggerEnter (other : Collider) { var distanceToRing; distanceToRing = Vector3.Distance(airplane.transform.position,transform.position); print ("Distance to Ring: "+distanceToRing); //~ distance check
ringscore1 = true ; }
and this is my current script for the 5TH Ring
function OnTriggerEnter (other : Collider) { if ((ringscore1 == true) && (ringscore2 == true) && (ringscore3 ==true) && (ringscore4 == true)) { yield WaitForSeconds(3); Application.LoadLevel("scene6Landing"); } }