Hi there,
I have a currently working code with a timer that starts and finishes on trigger and on collision respectively. But I am having trouble coding up how to make sure the character has to finish one mission to move on to the next.how will I go about coding this. So basically finishing HasMission then only being able to activate HasMission1
many thanks in advance
if (Physics.Raycast (transform.position,dwn,hit, .5)) {
var t:Timer;
if(hit.collider.gameObject.tag=="HasMission"){
Debug.Log("has mission");
if(!showingMission){
showingMission=true;
t=GameObject.Find("Timer").GetComponent("Timer") as Timer;
t.startTimer();
}
}else if(hit.collider.gameObject.tag=="EndMission"){
}
}
if (Physics.Raycast (transform.position,dwn,hit, .5)) {
if(hit.collider.gameObject.tag=="HasMission1"){
Debug.Log("has mission");
if(!showingMission2){
showingMission2=true;
t=GameObject.Find("Timer1").GetComponent("Timer") as Timer;
t.startTimer();
}
}else if(hit.collider.gameObject.tag=="EndMission1"){
}
}