hello everybody ,
i have a question , im currently in the stage of knowing how to make a character move in third person fashion …
but now … i want to reach a step further …
i was able to make my character collect items with this script …
static var Count : int = 0;
var CollectSound : AudioClip;
function OnControllerColliderHit(hit:ControllerColliderHit){
if(hit.gameObject.tag == “gem”){
Destroy(hit.gameObject);
Count++;
audio.PlayOneShot(CollectSound);
}
}
and i have another script for the GUI
function Update () {
var prefix = "Gems: ";
var suffix = “/3”;
guiText.text = prefix + GemCollect.Count + suffix;
}
my question is … how the hell can i make an event trigger after collecting all the items …
thanks !!